OverSim
SimpleUnderlayCoordsInfo Class Reference

#include <CoordinateSystem.h>

Inheritance diagram for SimpleUnderlayCoordsInfo:
EuclideanNcsNodeInfo AbstractNcsNodeInfo

Public Member Functions

 operator Coords () const
bool isValid ()
Prox getDistance (const AbstractNcsNodeInfo &abstractInfo) const
bool update (const AbstractNcsNodeInfo &abstractInfo)
- Public Member Functions inherited from EuclideanNcsNodeInfo
 EuclideanNcsNodeInfo ()
virtual ~EuclideanNcsNodeInfo ()
uint8_t getDimension () const
double getCoords (uint8_t i) const
const CoordsgetCoords () const
void setCoords (uint8_t i, double value)
- Public Member Functions inherited from AbstractNcsNodeInfo
virtual ~AbstractNcsNodeInfo ()

Additional Inherited Members

- Static Public Member Functions inherited from EuclideanNcsNodeInfo
static void setDimension (uint8_t dimension)
- Protected Attributes inherited from EuclideanNcsNodeInfo
Coords coordinates
- Static Protected Attributes inherited from EuclideanNcsNodeInfo
static uint8_t dim

Detailed Description

Definition at line 108 of file CoordinateSystem.h.

Member Function Documentation

Prox SimpleUnderlayCoordsInfo::getDistance ( const AbstractNcsNodeInfo abstractInfo) const
virtual

Reimplemented from EuclideanNcsNodeInfo.

Definition at line 181 of file CoordinateSystem.cc.

Referenced by SimpleUnderlayNCS::getCoordinateBasedProx().

{
if (!dynamic_cast<const SimpleUnderlayCoordsInfo*>(&abstractInfo)) {
}
*(static_cast<const SimpleUnderlayCoordsInfo*>(&abstractInfo));
double dist = 0.0;
for (uint8_t i = 0; i < info.getDimension(); ++i) {
dist += pow(getCoords(i) - info.getCoords(i), 2);
}
dist = sqrt(dist);
dist *= 2;
return Prox(dist, 0.7); //TODO
}
bool SimpleUnderlayCoordsInfo::isValid ( )
inlinevirtual

Implements AbstractNcsNodeInfo.

Definition at line 115 of file CoordinateSystem.h.

{ return true; };
SimpleUnderlayCoordsInfo::operator Coords ( ) const
virtual

Implements AbstractNcsNodeInfo.

Definition at line 164 of file CoordinateSystem.cc.

{
return coordinates;
}
bool SimpleUnderlayCoordsInfo::update ( const AbstractNcsNodeInfo abstractInfo)
virtual

Implements AbstractNcsNodeInfo.

Definition at line 170 of file CoordinateSystem.cc.

{
if (!dynamic_cast<const SimpleUnderlayCoordsInfo*>(&abstractInfo)) return false;
const SimpleUnderlayCoordsInfo& temp = static_cast<const SimpleUnderlayCoordsInfo&>(abstractInfo);
return true;
}

The documentation for this class was generated from the following files: