Changeset 18914


Ignore:
Timestamp:
12/03/14 12:01:11 (10 years ago)
Author:
Mathieu Morlighem
Message:

BUG: not compiling on thwaites

Location:
issm/trunk-jpl/src/c/classes/kriging
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/kriging/Covertree.cpp

    r18912 r18914  
    22//#include <utility>
    33#include <set>
     4//#include <vector>
     5#include <algorithm>
    46
    57        /*Constructors/Destructors*/
     
    192194                        Observation q = (*it)->getObservation();
    193195                        double minDQ = 1.e+50;
    194                         CoverTreeNode* minDQNode = nullptr;
     196                        CoverTreeNode* minDQNode = NULL;
    195197                        double sep = pow(base,i);
    196198                        bool br=false;
     
    220222                        //std::cout << " is level " << i << " parent of ";
    221223                        //(*it)->getObservation().print();
    222                         if (minDQNode != nullptr)
     224                        if (minDQNode != NULL)
    223225                         minDQNode->addChild(i,*it);
    224226                }
  • issm/trunk-jpl/src/c/classes/kriging/Observation.cpp

    r18912 r18914  
    8383double Observation::distance(const Observation& ob) const
    8484{
    85         return std::sqrt( (std::pow( (ob.getXY().first - this->x), 2 ) + std::pow((ob.getXY().second - this->y), 2) ));
     85        return std::sqrt( (std::pow( (ob.x - this->x), 2 ) + std::pow((ob.y - this->y), 2) ));
    8686}
    8787
    88 const std::pair<double, double>& Observation::getXY() const
    89 {
    90         return std::make_pair(this->x, this->y);
    91 }
    9288bool Observation::operator==(const Observation& ob) const
    9389{
    94         return (ob.getXY().first == this->x && ob.getXY().second == this->y && ob.value == this->value);
     90        return (ob.x == this->x && ob.y == this->y && ob.value == this->value);
    9591}
    9692
    9793void Observation::WriteXYObs(const Observation& ob, double* px, double* py, double* pobs){
    98     *px   = ob.getXY().first;
    99     *py   = ob.getXY().second;
     94    *px   = ob.x;
     95    *py   = ob.y;
    10096    *pobs = ob.value;
    10197}
  • issm/trunk-jpl/src/c/classes/kriging/Observation.h

    r18912 r18914  
    2525                /*Object virtual functions definitions*/
    2626                double  distance(const Observation& ob) const;
    27                 const   std::pair<double, double>& getXY() const;
    2827
    2928                void    Echo();
Note: See TracChangeset for help on using the changeset viewer.