a_star :: AStarPath :: defaultinit
a_star :: AStarPath :: total_cost=
Total cost of this patha_star $ AStarPath :: core_serialize_to
Actual serialization ofself
to serializer
a_star $ AStarPath :: from_deserializer
Create an instance of this class from thedeserializer
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePackserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
core :: Object :: defaultinit
a_star :: AStarPath :: defaultinit
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arraycore :: Object :: output_class_name
Display class name on stdout (debug only).serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
a_star :: AStarPath :: total_cost=
Total cost of this pathSerializer::serialize
# Result from path finding and a walkable path
class AStarPath[N]
serialize
# Total cost of this path
var total_cost: Int
# Nodes composing this path
var nodes = new List[N]
private var at: Int = 0
# Step on the path and get the next node to travel
fun step: N
do
assert nodes.length >= at else print "a_star::AStarPath::step failed, is at_end_of_path"
var s = nodes[at]
at += 1
return s
end
# Peek at the next step of the path
fun peek_step: N do return nodes[at]
# Are we at the end of this path?
fun at_end_of_path: Bool do return at >= nodes.length
end
lib/a_star/a_star.nit:300,1--328,3