-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLightGraph.H
42 lines (38 loc) · 1.14 KB
/
LightGraph.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/****************************************************************
LightGraph.H
Copyright (C)2013 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_LightGraph_H
#define INCL_LightGraph_H
#include <iostream>
#include "BOOM/Vector.H"
#include "LightEdge.H"
#include "LightVertex.H"
using namespace std;
using namespace BOOM;
class LightGraph {
public:
LightGraph(const String &filename);
LightGraph(File &);
virtual ~LightGraph();
bool save(const String &filename);
bool save(ostream &);
int getNumVertices() const;
int getNumEdges() const;
int getLargestEdgeID() const;
LightVertex *getVertex(int);
LightEdge *getEdge(int);
const String &getSubstrate() const;
void printOn(ostream &);
inline int getSubstrateLength() { return substrateLength; }
protected:
Vector<LightVertex*> vertices;
Vector<LightEdge*> edges;
String substrate;
int substrateLength;
bool load(File &);
};
ostream &operator<<(ostream &,const LightGraph &);
#endif