a_star :: PositionedNamedNode :: x
a_star :: PositionedNamedNode :: x=
a_star :: PositionedNamedNode :: y
a_star :: PositionedNamedNode :: y=
a_star $ PositionedNamedNode :: N
Type of the others nodes in thegraph
a_star $ PositionedNamedNode :: SELF
Type of this instance, automatically specialized in every classserialization :: 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
a_star :: NamedNode :: defaultinit
core :: Object :: defaultinit
a_star :: Node :: defaultinit
a_star :: Node :: find_closest
Find the closest node accepted bycond
under max_cost
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).a_star :: Node :: path_to_alts
Find a path to a possibledestination
or a node accepted by alt_targets
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 :: PositionedNamedNode :: x
a_star :: PositionedNamedNode :: x=
a_star :: PositionedNamedNode :: y
a_star :: PositionedNamedNode :: y=
Serializer::serialize
# Node with a name and position
class PositionedNamedNode
super NamedNode
redef type N: PositionedNamedNode
var x: Int
var y: Int
redef fun to_s do return "{super}-at-({x},{y})"
fun dist_with(o: PositionedNamedNode): Int
do
var dx = o.x - x
var dy = o.y - y
var d2 = dx*dx + dy*dy
return d2.sqrt
end
end
lib/a_star/tests/test_a_star.nit:244,1--262,3