GODPAPER | All Packages | All Classes | Index | Frames No Frames |
GraphBoard

Package | com.lookbackon.ds
Class | public class GraphBoard
Inheritance | GraphBoard Object

This graphic board providing the graph data struct and searchable functions;

Public Methods

| Method | Defined By
--- | --- | ---
|  | GraphBoard(w:int, h:int, isDigraph:Boolean = true) Constructor Graph uncorrespondence for ..no.. | GraphBoard
|  | addEdge(edge:Edge):Boolean Edge addition | GraphBoard
|  | addNode(node:Node):int Node addition | GraphBoard
|  | clear():void | GraphBoard
|  | dump():String Prints out all elements (for debug/demo purposes). | GraphBoard
|  | edge(src:int):Array Edge group acquisition | GraphBoard
|  | nNodes():int Number of nodes | GraphBoard
|  | node(index:int):Node Node acquisition | GraphBoard
|  | removeEdge(src:int, dst:int):void Edge deletion | GraphBoard
|  | removeNode(index:int):void Node deletion | GraphBoard
|  | size():int Size of node buffer (number of ≠ nodes) | GraphBoard

Constructor Detail

GraphBoard | () | Constructor

`public function GraphBoard(w:int, h:int, isDigraph:Boolean = true)`

Constructor Graph uncorrespondence for ..no..

Parameters

| `w:int` — Whether it is an effective graph or not?
| `h:int`
| `isDigraph:Boolean` (default = `true`)``

Method Detail

addEdge | () | method

`public function addEdge(edge:Edge):Boolean`

Edge addition

Parameters

| `edge:Edge` — Added edge

Returns

| `Boolean` — Whether it was possible to add it or not?

addNode | () | method |

`public function addNode(node:Node):int`

Node addition

Parameters

| `node:Node` — Added node

Returns

| `int` — Index of added node

clear | () | method |

`public function clear():void`

dump | () | method |

`public function dump():String`

Prints out all elements (for debug/demo purposes).

Returns

| `String` — A human-readable representation of the structure.

edge | () | method |

`public function edge(src:int):Array`

Edge group acquisition

Parameters

| `src:int` — Start point

Returns

| `Array`

nNodes | () | method |

`public function nNodes():int`

Number of nodes

Returns

| `int`

node | () | method |

`public function node(index:int):Node`

Node acquisition

Parameters

| `index:int` — Index

Returns

| `Node`

removeEdge | () | method |

`public function removeEdge(src:int, dst:int):void`

Edge deletion

Parameters

| `src:int` — Starting point of deleted edge
| `dst:int` — Terminal of deleted edge

removeNode | () | method |

`public function removeNode(index:int):void`

Node deletion

Parameters

| `index:int` — Index of deleted node

size | () | method |

`public function size():int`

Size of node buffer (number of ≠ nodes)

Returns

| `int`

Thu Jan 16 2014, 01:11 PM +08:00