Changeset 19153
- Timestamp:
- 02/25/15 09:21:54 (10 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/kriging
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/kriging/Covertree.cpp
r18919 r19153 1 1 #include "../classes.h" 2 //#include <utility>3 2 #include <set> 4 //#include <vector>5 3 #include <algorithm> 6 4 7 5 /*Constructors/Destructors*/ 8 Covertree::Covertree(int maxLevel,const std::vector<Observation>& points){ 6 Covertree::Covertree(int maxLevel,const std::vector<Observation>& points){/*{{{*/ 9 7 this->base = 2.; 10 8 _root=NULL; … … 16 14 this->insert(*it);//adds data to the covertree object 17 15 } 18 } 19 20 Covertree::~Covertree(){ 16 }/*}}}*/ 17 Covertree::~Covertree(){/*{{{*/ 21 18 if(_root==NULL) return; 22 19 //Get all of the root's children (from any level), … … 31 28 delete byeNode; 32 29 } 33 } 30 }/*}}}*/ 34 31 35 /*Methods*/36 std::vector<Covertree::CoverTreeNode*> Covertree::kNearestNodes(const Observation& p, const unsigned int& k) const{ 32 /*Methods*/ 33 std::vector<Covertree::CoverTreeNode*> Covertree::kNearestNodes(const Observation& p, const unsigned int& k) const{/*{{{*/ 37 34 if(_root==NULL) return std::vector<CoverTreeNode*>(); 38 35 //maxDist is the kth nearest known point to p, and also the farthest … … 80 77 } 81 78 return kNN; 82 } 83 bool Covertree::insert_rec(const Observation& p, const std::vector<distNodePair>& Qi, const int& level){79 }/*}}}*/ 80 bool Covertree::insert_rec(const Observation& p, const std::vector<distNodePair>& Qi, const int& level){/*{{{*/ 84 81 std::vector<std::pair<double, CoverTreeNode*> > Qj; 85 82 double sep = pow(base,level); … … 119 116 } 120 117 } 121 } 122 123 void Covertree::remove_rec(const Observation& p, std::map<int,std::vector<distNodePair> >& coverSets, int level, bool& multi){ 118 }/*}}}*/ 119 void Covertree::remove_rec(const Observation& p, std::map<int,std::vector<distNodePair> >& coverSets, int level, bool& multi){/*{{{*/ 124 120 std::vector<distNodePair>& Qi = coverSets[level]; 125 121 std::vector<distNodePair>& Qj = coverSets[level-1]; … … 222 218 } 223 219 } 224 } 225 226 int Covertree::get_numberofobs(){ 220 }/*}}}*/ 221 int Covertree::get_numberofobs(){/*{{{*/ 227 222 return _numNodes; 228 } 229 230 std::pair<double, Covertree::CoverTreeNode*> 231 Covertree::distance(const Observation& p, 232 const std::vector<CoverTreeNode*>& Q) 233 { 223 }/*}}}*/ 224 std::pair<double, Covertree::CoverTreeNode*> Covertree::distance(const Observation& p, const std::vector<CoverTreeNode*>& Q){/*{{{*/ 234 225 double minDist = 1.e+50; 235 226 CoverTreeNode* minNode; … … 243 234 } 244 235 return std::make_pair(minDist,minNode); 245 } 246 247 void Covertree::insert(const Observation& newObservation) 248 { 236 }/*}}}*/ 237 void Covertree::insert(const Observation& newObservation){/*{{{*/ 249 238 if(_root==NULL) { 250 239 _root = new CoverTreeNode(newObservation); … … 265 254 _maxLevel); 266 255 } 267 } 268 269 void Covertree::remove(const Observation& p) 270 { 256 }/*}}}*/ 257 void Covertree::remove(const Observation& p){/*{{{*/ 271 258 //Most of this function's code is for the special case of removing the root 272 259 if(_root==NULL) return; … … 305 292 _root=newRoot; 306 293 } 307 } 308 309 std::vector<Observation> Covertree::kNearestNeighbors(const Observation& p, const unsigned int& k) const{ 294 }/*}}}*/ 295 std::vector<Observation> Covertree::kNearestNeighbors(const Observation& p, const unsigned int& k) const{/*{{{*/ 310 296 if(_root==NULL) return std::vector<Observation>(); 311 297 std::vector<CoverTreeNode*> v = kNearestNodes(p, k); … … 318 304 } 319 305 return kNN; 320 } 321 322 void Covertree::print() const{ 306 }/*}}}*/ 307 void Covertree::print() const{/*{{{*/ 323 308 int d = _maxLevel-_minLevel+1; 324 309 std::vector<CoverTreeNode*> Q; … … 346 331 std::cout << "\n\n"; 347 332 } 348 } 333 }/*}}}*/ 349 334 350 Covertree::CoverTreeNode* Covertree::getRoot() const 351 { 335 Covertree::CoverTreeNode* Covertree::getRoot() const{/*{{{*/ 352 336 return _root; 353 } 354 355 Covertree::CoverTreeNode::CoverTreeNode(const Observation& p) { 337 }/*}}}*/ 338 Covertree::CoverTreeNode::CoverTreeNode(const Observation& p) {/*{{{*/ 356 339 _observations.push_back(p); 357 } 358 359 std::vector<Covertree::CoverTreeNode*> 360 Covertree::CoverTreeNode::getChildren(int level) const 361 { 340 }/*}}}*/ 341 std::vector<Covertree::CoverTreeNode*> Covertree::CoverTreeNode::getChildren(int level) const{/*{{{*/ 362 342 std::map<int,std::vector<CoverTreeNode*> >::const_iterator 363 343 it = _childMap.find(level); … … 366 346 } 367 347 return std::vector<CoverTreeNode*>(); 368 } 369 370 void Covertree::CoverTreeNode::addChild(int level, CoverTreeNode* p) 371 { 348 }/*}}}*/ 349 void Covertree::CoverTreeNode::addChild(int level, CoverTreeNode* p){/*{{{*/ 372 350 _childMap[level].push_back(p); 373 } 374 375 void Covertree::CoverTreeNode::removeChild(int level, CoverTreeNode* p) 376 { 351 }/*}}}*/ 352 void Covertree::CoverTreeNode::removeChild(int level, CoverTreeNode* p){/*{{{*/ 377 353 std::vector<CoverTreeNode*>& v = _childMap[level]; 378 354 for(unsigned int i=0;i<v.size();i++) { … … 383 359 } 384 360 } 385 } 386 387 void Covertree::CoverTreeNode::addObservation(const Observation& p) 388 { 361 }/*}}}*/ 362 void Covertree::CoverTreeNode::addObservation(const Observation& p){/*{{{*/ 389 363 if(find(_observations.begin(), _observations.end(), p) == _observations.end()) 390 364 _observations.push_back(p); 391 } 392 393 void Covertree::CoverTreeNode::removeObservation(const Observation& p) 394 { 365 }/*}}}*/ 366 void Covertree::CoverTreeNode::removeObservation(const Observation& p){/*{{{*/ 395 367 std::vector<Observation>::iterator it = 396 368 find(_observations.begin(), _observations.end(), p); 397 369 if(it != _observations.end()) 398 370 _observations.erase(it); 399 } 400 401 double Covertree::CoverTreeNode::distance(const CoverTreeNode& p) const 402 { 371 }/*}}}*/ 372 double Covertree::CoverTreeNode::distance(const CoverTreeNode& p) const{/*{{{*/ 403 373 return _observations[0].distance(p.getObservation()); 404 } 405 406 bool Covertree::CoverTreeNode::isSingle() const 407 { 374 }/*}}}*/ 375 bool Covertree::CoverTreeNode::isSingle() const{/*{{{*/ 408 376 return _observations.size() == 1; 409 } 410 411 bool Covertree::CoverTreeNode::hasObservation(const Observation& p) const 412 { 377 }/*}}}*/ 378 bool Covertree::CoverTreeNode::hasObservation(const Observation& p) const{/*{{{*/ 413 379 return find(_observations.begin(), _observations.end(), p) != _observations.end(); 414 } 415 416 const Observation& Covertree::CoverTreeNode::getObservation() const { return _observations[0]; } 417 418 std::vector<Covertree::CoverTreeNode*> 419 Covertree::CoverTreeNode::getAllChildren() const 420 { 380 }/*}}}*/ 381 const Observation& Covertree::CoverTreeNode::getObservation() const{/*{{{*/ 382 return _observations[0]; 383 }/*}}}*/ 384 std::vector<Covertree::CoverTreeNode*> Covertree::CoverTreeNode::getAllChildren() const{/*{{{*/ 421 385 std::vector<CoverTreeNode*> children; 422 386 std::map<int,std::vector<CoverTreeNode*> >::const_iterator it; … … 425 389 } 426 390 return children; 427 } 428 429 bool Covertree::isValidTree() const { 391 }/*}}}*/ 392 bool Covertree::isValidTree() const {/*{{{*/ 430 393 if(_numNodes==0) 431 394 return _root==NULL; … … 465 428 } 466 429 return true; 467 } 430 }/*}}}*/ -
issm/trunk-jpl/src/c/classes/kriging/Covertree.h
r18919 r19153 8 8 class Covertree{ 9 9 10 /** 11 * Cover tree node. Consists of arbitrarily many points P, as long as 12 * they have distance 0 to each other. Keeps track of its children. 13 */ 10 /* Cover tree node. Consists of arbitrarily many points P, as long as they 11 * have distance 0 to each other. Keeps track of its children. */ 14 12 class CoverTreeNode{ 15 13 private: … … 34 32 const std::vector<Observation>& getObservations() { return _observations; } 35 33 double distance(const CoverTreeNode& p) const; 36 37 bool isSingle() const; 38 bool hasObservation(const Observation& o) const; 39 34 bool isSingle() const; 35 bool hasObservation(const Observation& o) const; 40 36 const Observation& getObservation() const; 41 37 … … 49 45 typedef std::pair<double, CoverTreeNode*> distNodePair; 50 46 51 CoverTreeNode *_root;52 unsigned int _numNodes;53 int _maxLevel;//base^_maxLevel should be the max distance47 CoverTreeNode *_root; 48 unsigned int _numNodes; 49 int _maxLevel; //base^_maxLevel should be the max distance 54 50 //between any 2 points 55 int _minLevel;//A level beneath which there are no more new nodes.51 int _minLevel; //A level beneath which there are no more new nodes. 56 52 57 std::vector<CoverTreeNode*> 58 kNearestNodes(const Observation& o, const unsigned int& k) const; 53 std::vector<CoverTreeNode*> kNearestNodes(const Observation& o, const unsigned int& k) const; 59 54 /** 60 55 * Recursive implementation of the insert algorithm (see paper). 61 56 */ 62 bool insert_rec(const Observation& p, 63 const std::vector<distNodePair>& Qi, 64 const int& level); 57 bool insert_rec(const Observation& p, const std::vector<distNodePair>& Qi,const int& level); 65 58 66 /** 67 * Finds the node in Q with the minimum distance to p. Returns a 68 * pair consisting of this node and the distance. 69 */ 70 distNodePair distance(const Observation& p, 71 const std::vector<CoverTreeNode*>& Q); 59 /* Finds the node in Q with the minimum distance to p. Returns a pair 60 * consisting of this node and the distance. */ 61 distNodePair distance(const Observation& p,const std::vector<CoverTreeNode*>& Q); 72 62 73 63 74 void remove_rec(const Observation& p, 75 std::map<int,std::vector<distNodePair> >& coverSets, 76 int level, 77 bool& multi); 64 void remove_rec(const Observation& p, std::map<int,std::vector<distNodePair> >& coverSets, int level, bool& multi); 78 65 79 66 public: … … 89 76 */ 90 77 91 Covertree(int maxDist, 92 const std::vector<Observation>& points=std::vector<Observation>()); 78 Covertree(int maxDist,const std::vector<Observation>& points=std::vector<Observation>()); 93 79 ~Covertree(); 94 80 -
issm/trunk-jpl/src/c/classes/kriging/Observations.cpp
r18919 r19153 59 59 _error_("Tree type "<<this->treetype<<" not supported yet (1: quadtree, 2: covertree)"); 60 60 } 61 62 63 64 61 } 65 62 /*}}}*/ … … 131 128 if(observations_list[i]<mintrimming) continue; 132 129 133 /* Firstcheck that this observation is not too close from another one*/130 /*Second, check that this observation is not too close from another one*/ 134 131 this->quadtree->ClosestObs(&index,x[i],y[i]); 135 132 if(index>=0){ … … 157 154 void Observations::InitCovertree(IssmPDouble* observations_list,IssmPDouble* x,IssmPDouble* y,int n,Options* options){/*{{{*/ 158 155 159 int maxdepth = 20; 156 /*Intermediaries*/ 157 int maxdepth = 20; 158 IssmPDouble minspacing,mintrimming,maxtrimming; 159 160 /*Checks*/ 161 _assert_(n); 162 163 /*Get trimming limits*/ 164 options->Get(&mintrimming,"mintrimming",-1.e+21); 165 options->Get(&maxtrimming,"maxtrimming",+1.e+21); 166 options->Get(&minspacing,"minspacing",0.01); 167 if(minspacing<=0) _error_("minspacing must > 0"); 168 160 169 _printf0_("Generating covertree with a maximum depth " << maxdepth <<"... "); 161 170 this->covertree=new Covertree(maxdepth); 162 171 163 172 for(int i=0;i<n;i++){ 164 this->covertree->insert(Observation(x[i],y[i],observations_list[i])); 173 174 /*First check limits*/ 175 if(observations_list[i]>maxtrimming) continue; 176 if(observations_list[i]<mintrimming) continue; 177 178 /*Second, check that this observation is not too close from another one*/ 179 Observation newobs = Observation(x[i],y[i],observations_list[i]); 180 if(i>0 && this->covertree->getRoot()){ 181 /*Get closest obs and see if it is too close*/ 182 std::vector<Observation> kNN=(this->covertree->kNearestNeighbors(newobs,1)); 183 Observation oldobs = (*kNN.begin()); 184 if(oldobs.distance(newobs)<minspacing) continue; 185 } 186 187 this->covertree->insert(newobs); 165 188 } 166 189 _printf0_("done\n"); … … 170 193 /*Methods*/ 171 194 void Observations::ClosestObservation(IssmPDouble *px,IssmPDouble *py,IssmPDouble *pobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){/*{{{*/ 195 196 switch(this->treetype){ 197 case 1: 198 this->ClosestObservationQuadtree(px,py,pobs,x_interp,y_interp,radius); 199 break; 200 case 2: 201 this->ClosestObservationCovertree(px,py,pobs,x_interp,y_interp,radius); 202 break; 203 default: 204 _error_("Tree type "<<this->treetype<<" not supported yet (1: quadtree, 2: covertree)"); 205 } 206 207 }/*}}}*/ 208 void Observations::ClosestObservationQuadtree(IssmPDouble *px,IssmPDouble *py,IssmPDouble *pobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){/*{{{*/ 172 209 173 210 /*Output and Intermediaries*/ … … 220 257 221 258 }/*}}}*/ 259 void Observations::ClosestObservationCovertree(IssmPDouble *px,IssmPDouble *py,IssmPDouble *pobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){/*{{{*/ 260 261 IssmPDouble hmin = UNDEF; 262 263 if(this->covertree->getRoot()){ 264 /*Get closest obs and see if it is too close*/ 265 Observation newobs = Observation(x_interp,y_interp,0.); 266 std::vector<Observation> kNN=(this->covertree->kNearestNeighbors(newobs,1)); 267 Observation observation = (*kNN.begin()); 268 hmin = observation.distance(newobs); 269 if(hmin<=radius){ 270 *px = observation.x; 271 *py = observation.y; 272 *pobs = observation.value; 273 return; 274 } 275 } 276 277 *px = UNDEF; 278 *py = UNDEF; 279 *pobs = UNDEF; 280 }/*}}}*/ 222 281 void Observations::Distances(IssmPDouble* distances,IssmPDouble *x,IssmPDouble *y,int n,IssmPDouble radius){/*{{{*/ 223 282 … … 234 293 } 235 294 }/*}}}*/ 295 void Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs){/*{{{*/ 296 297 /*Output and Intermediaries*/ 298 int nobs; 299 IssmPDouble *x = NULL; 300 IssmPDouble *y = NULL; 301 IssmPDouble *obs = NULL; 302 Observation *observation = NULL; 303 304 nobs = this->Size(); 305 306 if(nobs){ 307 x = xNew<IssmPDouble>(nobs); 308 y = xNew<IssmPDouble>(nobs); 309 obs = xNew<IssmPDouble>(nobs); 310 for(int i=0;i<this->Size();i++){ 311 observation=xDynamicCast<Observation*>(this->GetObjectByOffset(i)); 312 observation->WriteXYObs(&x[i],&y[i],&obs[i]); 313 } 314 } 315 316 /*Assign output pointer*/ 317 *px=x; 318 *py=y; 319 *pobs=obs; 320 *pnobs=nobs; 321 }/*}}}*/ 236 322 void Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int maxdata){/*{{{*/ 237 323 238 if(this->treetype==2){ 239 this->ObservationList2(px,py,pobs,pnobs,x_interp,y_interp,radius,maxdata); 240 return; 241 } 324 switch(this->treetype){ 325 case 1: 326 this->ObservationListQuadtree(px,py,pobs,pnobs,x_interp,y_interp,radius,maxdata); 327 break; 328 case 2: 329 this->ObservationListCovertree(px,py,pobs,pnobs,x_interp,y_interp,radius,maxdata); 330 break; 331 default: 332 _error_("Tree type "<<this->treetype<<" not supported yet (1: quadtree, 2: covertree)"); 333 } 334 }/*}}}*/ 335 void Observations::ObservationListQuadtree(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int maxdata){/*{{{*/ 242 336 243 337 /*Output and Intermediaries*/ … … 321 415 *pnobs=nobs; 322 416 }/*}}}*/ 323 void Observations::ObservationList(IssmPDouble **px,IssmPDouble **py,IssmPDouble **pobs,int* pnobs){/*{{{*/ 324 325 /*Output and Intermediaries*/ 326 int nobs; 327 IssmPDouble *x = NULL; 328 IssmPDouble *y = NULL; 329 IssmPDouble *obs = NULL; 330 Observation *observation = NULL; 331 332 nobs = this->Size(); 333 334 if(nobs){ 335 x = xNew<IssmPDouble>(nobs); 336 y = xNew<IssmPDouble>(nobs); 337 obs = xNew<IssmPDouble>(nobs); 338 for(int i=0;i<this->Size();i++){ 339 observation=xDynamicCast<Observation*>(this->GetObjectByOffset(i)); 340 observation->WriteXYObs(&x[i],&y[i],&obs[i]); 341 } 342 } 343 344 /*Assign output pointer*/ 417 void Observations::ObservationListCovertree(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){/*{{{*/ 418 419 double *x = NULL; 420 double *y = NULL; 421 double *obs = NULL; 422 Observation observation=Observation(x_interp,y_interp,0.); 423 std::vector<Observation> kNN; 424 425 kNN=(this->covertree->kNearestNeighbors(observation, maxdata)); 426 //cout << "kNN's size: " << kNN.size() << " (maxdata = " <<maxdata<<")"<<endl; 427 428 //kNN is sort from closest to farthest neighbor 429 //searches for the first neighbor that is out of radius 430 //deletes and resizes the kNN vector 431 vector<Observation>::iterator it; 432 if(radius>0.){ 433 for (it = kNN.begin(); it != kNN.end(); ++it) { 434 //(*it).print(); 435 //cout << "\n" << (*it).distance(observation) << endl; 436 if ((*it).distance(observation) > radius) { 437 break; 438 } 439 } 440 kNN.erase(it, kNN.end()); 441 } 442 443 /*Allocate vectors*/ 444 x = new double[kNN.size()]; 445 y = new double[kNN.size()]; 446 obs = new double[kNN.size()]; 447 448 /*Loop over all observations and fill in x, y and obs*/ 449 int i = 0; 450 for(it = kNN.begin(); it != kNN.end(); ++it) { 451 (*it).WriteXYObs((*it), &x[i], &y[i], &obs[i]); 452 i++; 453 } 454 345 455 *px=x; 346 456 *py=y; 347 457 *pobs=obs; 348 *pnobs =nobs;458 *pnobs = kNN.size(); 349 459 }/*}}}*/ 350 460 void Observations::InterpolationIDW(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius,int mindata,int maxdata,IssmPDouble power){/*{{{*/ … … 362 472 _assert_(pprediction); 363 473 _assert_(power>0); 364 365 /*If radius is not provided or is 0, return all observations*/366 if(radius==0) radius=this->quadtree->root->length;367 474 368 475 /*Get list of observations for current point*/ … … 410 517 _assert_(pprediction && perror); 411 518 412 /*If radius is not provided or is 0, return all observations*/413 if(radius==0) radius=this->quadtree->root->length;414 415 519 /*Get list of observations for current point*/ 416 520 this->ObservationList(&x,&y,&obs,&n_obs,x_interp,y_interp,radius,maxdata); … … 470 574 xDelete<IssmPDouble>(B); 471 575 xDelete<IssmPDouble>(Lambda); 472 473 576 }/*}}}*/ 474 577 void Observations::InterpolationNearestNeighbor(IssmPDouble *pprediction,IssmPDouble x_interp,IssmPDouble y_interp,IssmPDouble radius){/*{{{*/ … … 617 720 }/*}}}*/ 618 721 619 void Observations::ObservationList2(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){/*{{{*/620 621 622 double *x = NULL;623 double *y = NULL;624 double *obs = NULL;625 Observation observation=Observation(x_interp,y_interp,0.);626 std::vector<Observation> kNN;627 628 kNN=(this->covertree->kNearestNeighbors(observation, maxdata));629 //cout << "kNN's size: " << kNN.size() << " (maxdata = " <<maxdata<<")"<<endl;630 631 //kNN is sort from closest to farthest neighbor632 //searches for the first neighbor that is out of radius633 //deletes and resizes the kNN vector634 vector<Observation>::iterator it;635 if(radius>0.){636 for (it = kNN.begin(); it != kNN.end(); ++it) {637 //(*it).print();638 //cout << "\n" << (*it).distance(observation) << endl;639 if ((*it).distance(observation) > radius) {640 break;641 }642 }643 kNN.erase(it, kNN.end());644 }645 646 /*Allocate vectors*/647 x = new double[kNN.size()];648 y = new double[kNN.size()];649 obs = new double[kNN.size()];650 651 /*Loop over all observations and fill in x, y and obs*/652 int i = 0;653 for(it = kNN.begin(); it != kNN.end(); ++it) {654 (*it).WriteXYObs((*it), &x[i], &y[i], &obs[i]);655 i++;656 }657 658 *px=x;659 *py=y;660 *pobs=obs;661 *pnobs = kNN.size();662 }/*}}}*/ -
issm/trunk-jpl/src/c/classes/kriging/Observations.h
r18912 r19153 34 34 /*Methods*/ 35 35 void ClosestObservation(IssmDouble *px,IssmDouble *py,IssmDouble *pobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius); 36 void ClosestObservationQuadtree(IssmDouble *px,IssmDouble *py,IssmDouble *pobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius); 37 void ClosestObservationCovertree(IssmDouble *px,IssmDouble *py,IssmDouble *pobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius); 36 38 void Distances(IssmPDouble* distances,IssmPDouble *x,IssmPDouble *y,int n,IssmPDouble radius); 37 39 void InterpolationIDW(IssmDouble *pprediction,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int mindata,int maxdata,IssmDouble power); … … 41 43 void ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs); 42 44 void ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int maxdata); 43 void ObservationList2(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int maxdata); 45 void ObservationListQuadtree(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int maxdata); 46 void ObservationListCovertree(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int maxdata); 44 47 void QuadtreeColoring(IssmDouble* A,IssmDouble *x,IssmDouble *y,int n); 45 48 void Variomap(IssmDouble* gamma,IssmDouble *x,int n);
Note:
See TracChangeset
for help on using the changeset viewer.