Go to the documentation of this file.
24 #define MAXINT INT_MAX
51 virtual double GetKey() {
return 0; }
52 virtual void Print(std::ostream&)
const;
74 void Save(
const char *file);
75 void Load(
const char *file);
77 void Export(
const char *fname);
86 const edge *
FindEdge(
unsigned int from,
unsigned int to)
const;
111 void Print(std::ostream&)
const;
131 edge(
unsigned int,
unsigned int,
double);
135 void SetLabelF(
unsigned int index,
double val);
136 void SetLabelL(
unsigned int index,
long val);
154 void Print(std::ostream&)
const;
213 void SetLabelF(
unsigned int index,
double val)
const;
214 void SetLabelL(
unsigned int index,
long val)
const;
216 if (index <
label.size())
217 return label[index].fval;
221 if (index <
label.size())
222 return label[index].lval;
230 void Print(std::ostream&)
const;
234 mutable std::vector<labelValue>
label;
std::vector< edge * > _allEdges
void SetLabelL(unsigned int index, long val) const
void SetLabelF(unsigned int index, double val) const
unsigned int getFrom() const
unsigned int getTo() const
node * RemoveNode(node *, unsigned int &)
edge * FindEdge(unsigned int from, unsigned int to)
Finds an edge between nodes with ids from and to, no matter which direction.
unsigned int neighbor_iterator
edge_iterator getOutgoingEdgeIter() const
edge * edgeIterNextIncoming(edge_iterator &) const
void setWeight(double val)
virtual void Print(std::ostream &) const
void setMarked(bool marked)
node * nodeIterNext(node_iterator &) const
std::vector< edge * >::const_iterator edge_iterator
static unsigned int uniqueIDCounter
edge * edgeIterNextOutgoing(edge_iterator &) const
std::vector< labelValue > label
virtual graph_object * Clone() const =0
void Print(std::ostream &) const
node * GetNode(unsigned long num)
edge(unsigned int, unsigned int, double)
edge * getEdge(unsigned int which)
edge * edgeIterNext(edge_iterator &) const
std::vector< node * > _nodes
void Print(std::ostream &) const
Parent class for nodes and edges allowing them to be stored in a Heap or manipulated with other data ...
std::vector< node * >::const_iterator node_iterator
long GetLabelL(unsigned int index) const
edge_iterator getEdgeIter() const
std::vector< edge * > _edgesOutgoing
graph_object * Clone() const
void SetLabelF(unsigned int index, double val)
void SetKeyLabel(int which)
graph_object * Clone() const
edge_iterator getEdgeIter() const
void Export(const char *fname)
void SetLabelL(unsigned int index, long val)
edge * getRandomIncomingEdge()
edge * getRandomOutgoingEdge()
edge_iterator getIncomingEdgeIter() const
void Save(const char *file)
node_iterator getNodeIter() const
int nodeNeighborNext(neighbor_iterator &) const
void Print(std::ostream &) const
std::vector< labelValue > label
double GetLabelF(unsigned int index) const
bool relaxReverseEdge(edge *e, int weightIndex)
unsigned int GetNum() const
void RemoveNode(unsigned int nodeNum)
double GetLabelF(unsigned int index) const
graph_object * Clone() const
long GetLabelL(unsigned int index) const
std::vector< node * > * getReachableNodes(node *start)
neighbor_iterator getNeighborIter() const
std::vector< edge * > _edges
std::vector< edge * > _edgesIncoming
edge * findDirectedEdge(unsigned int from, unsigned int to)
edge * edgeIterNext(edge_iterator &) const
int getNumIncomingEdges()
Nodes to be stored within a Graph.
int getNumOutgoingEdges()
void Load(const char *file)
edge * GetEdge(unsigned long num)
Edge class for connections between node in a Graph.
const char * GetName() const
bool relax(edge *e, int weightIndex)
std::ostream & operator<<(std::ostream &out, const graph_object &_Obj)