C# 클래스 GraphLibrary.Graph

A basic representation of a Graph.
파일 보기 프로젝트 열기: realn0whereman/ScanGen 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
start BaseVertex

공개 메소드들

메소드 설명
AcceptsToken ( String token ) : bool
AddIndividualCharacters ( Graph>.Dictionary characterClasses ) : void

Switches the character classes to individual characters

CombineGraphs ( Graph that ) : void

Combines two graphs. Uses this as the base and adds the passed one to the end.

CombineGraphs ( Graph that, bool spacewaster ) : void
CreateNewVertex ( ) : BaseVertex

Creates a new vertex with a name equal to the current length of the vertex list

CreateNewVertex ( bool accepting ) : BaseVertex

Creates a new vertex with a name equal to the current length of the vertex list

CreateNewVertex ( string name, bool accepting ) : BaseVertex

Creates and returns a new BaseVertex with the given name and adds it to the graph

Equals ( object other ) : bool
GetAdjacencyMatrix ( ) : List[][]
Graph ( ) : System

Creates a new Graph with a default start vertex Vertices.

ReadFromFile ( String path ) : Graph
RemoveVertex ( BaseVertex toRemove ) : void

Removes the given Vertex from the graph; also removes all edges which use this vertex.

SaveToFile ( String path ) : void
ToDOT ( String graphName ) : String

Stores this graph in the DOT format to show in graphviz

WriteTransitionTable ( ) : void
findAcceptingParents ( char transChar ) : List

메소드 상세

AcceptsToken() 공개 메소드

public AcceptsToken ( String token ) : bool
token String
리턴 bool

AddIndividualCharacters() 공개 메소드

Switches the character classes to individual characters
public AddIndividualCharacters ( Graph>.Dictionary characterClasses ) : void
characterClasses Graph>.Dictionary
리턴 void

CombineGraphs() 공개 메소드

Combines two graphs. Uses this as the base and adds the passed one to the end.
public CombineGraphs ( Graph that ) : void
that Graph Graph -> The graph to tack onto this one.
리턴 void

CombineGraphs() 공개 메소드

public CombineGraphs ( Graph that, bool spacewaster ) : void
that Graph
spacewaster bool
리턴 void

CreateNewVertex() 공개 메소드

Creates a new vertex with a name equal to the current length of the vertex list
public CreateNewVertex ( ) : BaseVertex
리턴 BaseVertex

CreateNewVertex() 공개 메소드

Creates a new vertex with a name equal to the current length of the vertex list
public CreateNewVertex ( bool accepting ) : BaseVertex
accepting bool Whether the vertex is an accepting state or not.
리턴 BaseVertex

CreateNewVertex() 공개 메소드

Creates and returns a new BaseVertex with the given name and adds it to the graph
public CreateNewVertex ( string name, bool accepting ) : BaseVertex
name string The name of the vertex to be added. The name must be unique.
accepting bool
리턴 BaseVertex

Equals() 공개 메소드

public Equals ( object other ) : bool
other object
리턴 bool

GetAdjacencyMatrix() 공개 메소드

public GetAdjacencyMatrix ( ) : List[][]
리턴 List[][]

Graph() 공개 메소드

Creates a new Graph with a default start vertex Vertices.
public Graph ( ) : System
리턴 System

ReadFromFile() 공개 정적인 메소드

public static ReadFromFile ( String path ) : Graph
path String
리턴 Graph

RemoveVertex() 공개 메소드

Removes the given Vertex from the graph; also removes all edges which use this vertex.
public RemoveVertex ( BaseVertex toRemove ) : void
toRemove BaseVertex The Vertex which will be completely removed from the graph.
리턴 void

SaveToFile() 공개 메소드

public SaveToFile ( String path ) : void
path String
리턴 void

ToDOT() 공개 메소드

Stores this graph in the DOT format to show in graphviz
public ToDOT ( String graphName ) : String
graphName String The name of this graph.
리턴 String

WriteTransitionTable() 공개 메소드

public WriteTransitionTable ( ) : void
리턴 void

findAcceptingParents() 공개 메소드

public findAcceptingParents ( char transChar ) : List
transChar char
리턴 List

프로퍼티 상세

start 공개적으로 프로퍼티

public BaseVertex,GraphLibrary start
리턴 BaseVertex