00001
00008 #ifndef _NODE_AND_RANKS_H_
00009 #define _NODE_AND_RANKS_H_
00010
00011 #include <vector>
00012 #include "TreeNode.h"
00013
00014 namespace ot {
00015
00020 class NodeAndRanks {
00021 public:
00022
00023 ot::TreeNode node;
00024 std::vector<int> ranks;
00028 bool operator == ( NodeAndRanks const & other) const{
00029 return ((this->node) == other.node);
00030 }
00031
00032 bool operator != ( NodeAndRanks const & other) const{
00033 return ((this->node) != other.node);
00034 }
00035
00036 bool operator < ( NodeAndRanks const & other) const{
00037 return ((this->node) < other.node);
00038 }
00039
00040 bool operator <= ( NodeAndRanks const & other) const{
00041 return ((this->node) <= other.node);
00042 }
00043
00044 bool operator > ( NodeAndRanks const & other) const{
00045 return ((this->node) > other.node);
00046 }
00047
00048 bool operator >= ( NodeAndRanks const & other) const{
00049 return ((this->node) >= other.node);
00050 }
00051
00052
00053 NodeAndRanks & operator = ( NodeAndRanks const & other) {
00054 if(this == (&other)) {return *this;}
00055 this->node = other.node;
00056 this->ranks = other.ranks;
00057 return *this;
00058 }
00059
00061
00064 NodeAndRanks () { }
00065
00066
00067 NodeAndRanks (const NodeAndRanks &other) {
00068 node = other.node;
00069 ranks = other.ranks;
00070 }
00072
00073 };
00074
00075 }
00076
00077
00078 #endif
00079
00080