-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpattern.h
30 lines (28 loc) · 839 Bytes
/
pattern.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
#ifndef DSL_PATTERN_H
#define DSL_PATTERN_H
// {{SMILE_PUBLIC_HEADER}}
#include <vector>
class DSL_network;
class DSL_dataset;
class DSL_pattern
{
public:
enum EdgeType {None,Undirected,Directed};
int GetSize() const;
void SetSize(int size);
EdgeType GetEdge(int from, int to) const;
void SetEdge(int from, int to, EdgeType type);
bool HasDirectedPath(int from, int to) const;
bool HasCycle() const;
bool IsDAG() const;
bool ToDAG();
void Set(DSL_network &input);
bool ToNetwork(const DSL_dataset &ds, DSL_network &net);
bool HasIncomingEdge(int to) const;
bool HasOutgoingEdge(int from) const;
void Print() const;
void GetAdjacentNodes(const int node, std::vector<int>& adj) const;
private:
std::vector<std::vector<EdgeType> > mat;
};
#endif