C# 클래스 ObstacleTowerGeneration.MissionGraph.Graph

The mission graph class
파일 보기 프로젝트 열기: amidos2006/GraphDungeonGenerator 1 사용 예제들

공개 메소드들

메소드 설명
Graph ( ) : System.Collections.Generic

constructor that creates an empty graph

ToString ( ) : string

get a representation string for the current graph

checkSimilarity ( Graph graph ) : bool

check similarity between two graphs based on the similarity of nodes and connections between them

getHighestAccessLevel ( ) : int

get the highest access level in all the nodes in the graph

getNodeIndex ( ObstacleTowerGeneration.MissionGraph.Node n ) : int

get the index of the node in the node array in the graph

getNumConnections ( ObstacleTowerGeneration.MissionGraph.Node node ) : int

get number of connections that is connected from that specific node

getPermutations ( int size ) : List

get subset of graphs of certain size. This function is used in pattern matching.

loadGraph ( string filename ) : void

load a graph from a txt file that is formated in a certain way

메소드 상세

Graph() 공개 메소드

constructor that creates an empty graph
public Graph ( ) : System.Collections.Generic
리턴 System.Collections.Generic

ToString() 공개 메소드

get a representation string for the current graph
public ToString ( ) : string
리턴 string

checkSimilarity() 공개 메소드

check similarity between two graphs based on the similarity of nodes and connections between them
public checkSimilarity ( Graph graph ) : bool
graph Graph the other graph that the function is checking similarity towards
리턴 bool

getHighestAccessLevel() 공개 메소드

get the highest access level in all the nodes in the graph
public getHighestAccessLevel ( ) : int
리턴 int

getNodeIndex() 공개 메소드

get the index of the node in the node array in the graph
public getNodeIndex ( ObstacleTowerGeneration.MissionGraph.Node n ) : int
n ObstacleTowerGeneration.MissionGraph.Node the node needed to find its index
리턴 int

getNumConnections() 공개 메소드

get number of connections that is connected from that specific node
public getNumConnections ( ObstacleTowerGeneration.MissionGraph.Node node ) : int
node ObstacleTowerGeneration.MissionGraph.Node the node where the calculation starts from
리턴 int

getPermutations() 공개 메소드

get subset of graphs of certain size. This function is used in pattern matching.
public getPermutations ( int size ) : List
size int the size of the subset graphs
리턴 List

loadGraph() 공개 메소드

load a graph from a txt file that is formated in a certain way
public loadGraph ( string filename ) : void
filename string the file path
리턴 void