pub fn recalculate(
        &mut self,
        _owner: &Reference,
        origin: gdnative::core_types::Variant,
        #[opt] optional_params: Option<Dictionary>,
    ) -> i64 {
        GODOT_SUCCESS
    }
/// Recalculates cost map and direction map information for each point,
/// overriding previous results.
///
/// This is the central function of the library, the one that actually uses
/// Dijkstra's algorithm.
///
/// # Parameters
///
/// - `origin` : ID of the origin point, or array of IDs (preferably
/// [Int32Array]).
/// - `optional_params:` [Dictionary] : Specifies optional arguments. \
/// Valid arguments are :
///   - `"input_is_destination":` [bool] (default : [true]) : \
///     Wether or not the `origin` points are seen as destination.
///   - `"maximum_cost":` [float]
///         (default : [INF]) : \
///     Specifies maximum cost. Once all shortest paths no longer than
///     maximum cost are found, algorithm terminates. All points with cost
///     bigger than this are treated as inaccessible.
///   - `"initial_costs":` [float] [Array] (default : empty) : \
///     Specifies initial costs for given origins. Values are paired with
///     corresponding indices in the origin argument. Every unspecified
///     cost is defaulted to `0.0`. \
///     Can be used to weigh the origins with a preference.
///   - `"terrain_weights":` [Dictionary] (default : empty) : \
///     Specifies weights of terrain types. Keys are terrain type IDs and
///     values are floats. Unspecified terrains will have
///     [infinite](INF) weight. \
///     Note that `-1` correspond to the default terrain (which have a
///     weight of `1.0`), and will thus be ignored if it appears in the
///     keys.
///   - `"termination_points":` [int] OR [int] [Array] (default : empty) : \
///     A set of points that stop the computation if they are reached by
///     the algorithm.
///
///   Note that keys of incorrect types are ignored with a warning.
///
/// # Errors
///
/// [FAILED] is returned if :
/// - One of the keys in `optional_params` is invalid.
/// - `origin` is neither an [int], a [PoolIntArray] or a [Array].
///
/// # Example
/// ```gdscript
/// var dijkstra_map = DijkstraMap.new()
/// dijkstra_map.add_point(0, 0)
/// dijkstra_map.add_point(1, 1)
/// dijkstra_map.add_point(2, 0)
/// dijkstra_map.connect_points(0, 1)
/// dijkstra_map.connect_points(1, 2, 10.0)
/// var optional_params = {
///     "terrain_weights": { 0: 1.0, 1: 2.0 },
///     "termination_points": null,
///     "input_is_destination": true,
///     "maximum_cost": 2.0,
///     "initial_costs": null,
/// }
/// dijkstra_map.recalculate(0, optional_params)
/// assert(dijkstra_map.get_direction_at_point(0) == 0)
/// assert(dijkstra_map.get_direction_at_point(1) == 0)
/// # 2 is too far from 0, so because we set "maximum_cost" to 2.0, it is innaccessible.
/// assert(dijkstra_map.get_direction_at_point(2) == -1)
/// ```
Recalculates cost map and direction map information for each point,
overriding previous results.

This is the central function of the library, the one that actually uses
Dijkstra's algorithm.
Recalculates cost map and direction map information for each point overriding previous results . This is the central function of the library the one that actually uses Dijkstra ' s algorithm .
pub fn recalculate(
        &mut self,
        _owner: &Reference,
        origin: gdnative::core_types::Variant,
        #[opt] optional_params: Option<Dictionary>,
    ) -> i64 {
        GODOT_SUCCESS
    }
pub fn recalculate ( & mut self , _owner : & Reference , origin : gdnative :: core_types :: Variant , # [ opt ] optional_params : Option < Dictionary > , ) -> i64 { GODOT_SUCCESS }
Recalculates cost map and direction map information for each point,
overriding previous results.
Recalculates cost map and direction map information for each point overriding previous results .
&mut self
_owner
&Reference
origin
gdnative::core_types::Variant
optional_params
Option<Dictionary>
&mut self
_owner
&Reference
origin
gdnative::core_types::Variant
: ID of the origin point, or array of IDs (preferably
[Int32Array]).
: ID of the origin point or array of IDs ( preferably [ Int32Array ] ) .
optional_params
Option<Dictionary>
optional_params:
[Dictionary] : Specifies optional arguments. \
Valid arguments are :
`"input_is_destination":` [bool] (default : [true]) : \
Wether or not the `origin` points are seen as destination.
`"maximum_cost":` [float]
(default : [INF]) : \
Specifies maximum cost. Once all shortest paths no longer than
maximum cost are found, algorithm terminates. All points with cost
bigger than this are treated as inaccessible.
`"initial_costs":` [float] [Array] (default : empty) : \
Specifies initial costs for given origins. Values are paired with
corresponding indices in the origin argument. Every unspecified
cost is defaulted to `0.0`. \
Can be used to weigh the origins with a preference.
`"terrain_weights":` [Dictionary] (default : empty) : \
Specifies weights of terrain types. Keys are terrain type IDs and
values are floats. Unspecified terrains will have
[infinite](INF) weight. \
Note that `-1` correspond to the default terrain (which have a
weight of `1.0`), and will thus be ignored if it appears in the
keys.
`"termination_points":` [int] OR [int] [Array] (default : empty) : \
A set of points that stop the computation if they are reached by
the algorithm.

Note that keys of incorrect types are ignored with a warning.
[ Dictionary ] : Specifies optional arguments . \ Valid arguments are : ` " input_is_destination " : ` [ bool ] ( default : [ true ] ) : \ Wether or not the ` origin ` points are seen as destination . ` " maximum_cost " : ` [ float ] ( default : [ INF ] ) : \ Specifies maximum cost . Once all shortest paths no longer than maximum cost are found algorithm terminates . All points with cost bigger than this are treated as inaccessible . ` " initial_costs " : ` [ float ] [ Array ] ( default : empty ) : \ Specifies initial costs for given origins . Values are paired with corresponding indices in the origin argument . Every unspecified cost is defaulted to ` 0 . 0 ` . \ Can be used to weigh the origins with a preference . ` " terrain_weights " : ` [ Dictionary ] ( default : empty ) : \ Specifies weights of terrain types . Keys are terrain type IDs and values are floats . Unspecified terrains will have [ infinite ] ( INF ) weight . \ Note that ` - 1 ` correspond to the default terrain ( which have a weight of ` 1 . 0 ` ) and will thus be ignored if it appears in the keys . ` " termination_points " : ` [ int ] OR [ int ] [ Array ] ( default : empty ) : \ A set of points that stop the computation if they are reached by the algorithm . Note that keys of incorrect types are ignored with a warning .
errors
[FAILED] is returned if :
One of the keys in `optional_params` is invalid.
`origin` is neither an [int], a [PoolIntArray] or a [Array].
[ FAILED ] is returned if : One of the keys in ` optional_params ` is invalid . ` origin ` is neither an [ int ] a [ PoolIntArray ] or a [ Array ] .
example
None
2 is too far from 0, so because we set "maximum_cost" to 2.0, it is innaccessible.
assert(dijkstra_map.get_direction_at_point(2) == -1)
```
assert ( dijkstra_map . get_direction_at_point ( 2 ) == - 1 ) ` ` `