name: UGraph <TObject> : public DoubleLinkedList< GraphVertex<TObject> >

synopsis:

g++ [flags ...] file ...

#include <UGraph.h>

UGraph(const UGraph<TObject>& copy_graph);
boolean insertArc(GraphArc<TObject>* start_vertex, GraphArc<TObject>* end_vertex, boolean is_epsilon = GraphArc<TObject>::DEF_EPSILON, float weight = GraphArc::DEF_WEIGHT);
boolean insertArc(GraphArc<TObject>* start_vertex, GraphArc<TObject>* end_vertex, boolean is_epsilon = GraphArc<TObject>::DEF_EPSILON, float weight = GraphArc::DEF_WEIGHT);
boolean removeArc(long start_index, long end_index);
boolean removeArc(GraphVertex* start_vertex, GraphVertex* end_vertex);
quick start:
// declare the graph object
//
UGraph<Char> graph;

// create some data
//
Char* char_a = new Char('a');
Char* char_b = new Char('b');

// create and add the vertices to the graph
//
GraphVertex<Char>* vertex_a = graph.insertVertex(char_a);
GraphVertex<Char>* vertex_b = graph.insertVertex(char_b);

// draw arcs between the vertices
//
graph.insertArc(graph.getStart(), vertex_a, false, 0.75);
graph.insertArc(vertex_a, vertex_b, false, 0.75);
graph.insertArc(vertex_b, graph.getTerm(), false, 0.75);

// write it in an Sof file
//
String tmp_filename(L"graph");
Sof tmp_file;
tmp_file.open(tmp_filename, File::WRITE_ONLY, File::TEXT);

graph.write(tmp_file, 1);
tmp_file.close();
description:

UGraph is a generic undirected graph template class. Internally, the UGraph is stored as a list of UGraphVertices. Each Vertex holds the information of the connection with other vertices.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: