A convinience implementation of a square lattice graph.
- Inheritance
- Object
- Graph
- Grid
Constructors
- Grid(List<List<bool>> boolGrid)
-
Initializes a Grid from a List<List<bool>>.…
- Grid.fromString(String stringGrid)
-
Initializes a Grid from a String.…
factory
Properties
- allNodes → List<PointNode>
-
Returns a list of all the nodes that are part of this graph.
read-only - cols → int
-
Number of cols in this Grid.
read-only - diagonalMovement → DiagonalMovement
-
Changes how the Grid.getNeighbors method decides which nodes are valid neighbors.
read / write - hashCode → int
-
Get a hash code for this object.…
read-only, inherited - rows → int
-
Number of rows in this Grid.
read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
containsNode(
PointNode node) → bool -
Returns whether or not the [Node] [node] is a member of this
Graph
. -
containsPoint(
point) → bool -
Returns whether or not this Grid contains a PointNode at
point
. -
distance(
PointNode n1, PointNode n2) → double -
Returns the euclidean distance between
n1
andn2
. -
getExteriorCorners(
) → List<PointNode> -
getExteriorCornersGraph(
) → UndirectedPointGraph -
Construct an UndirectedPointGraph from this Grids exterior corners.…
-
getNeighbors(
PointNode node, {bool onlyWalkable: true}) → List<PointNode> -
Return a list of nodes that are the neighbors of
node
.… -
heuristic(
PointNode n1, PointNode n2) → double -
Returns the heuristic distance estimate between
n1
andn2
. -
nodeFromPoint(
point) → PointNode -
noSuchMethod(
Invocation invocation) → dynamic -
noSuchMethod
is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed tonoSuchMethod
in anInvocation
. IfnoSuchMethod
returns a value, that value becomes the result of the original invocation.…inherited -
toString(
) → String -
Returns a string representation of this object.
inherited