pub fn connect_points(
        &mut self,
        _owner: &Reference,
        source: i32,
        target: i32,
        #[opt] weight: Option<f32>,
        #[opt] bidirectional: Option<bool>,
    ) -> i64 {
        result_to_int(Ok(()))
    }
/// Connects the two given points.
///
/// # Parameters
///
/// - `source` : source point of the connection.
/// - `target` : target point of the connection.
/// - `weight` : weight of the connection. Defaults to `1.0`.
/// - `bidirectional` : wether or not the reciprocal connection should be
/// made. Defaults to [true].
///
/// # Errors
///
/// Return [FAILED] if one of the points does not exists in the map.
///
/// # Example
/// ```gdscript
/// var dijkstra_map = DijkstraMap.new()
/// dijkstra_map.add_point(0)
/// dijkstra_map.add_point(1)
/// dijkstra_map.add_point(2)
/// dijkstra_map.connect_points(0, 1, 2.0)
/// dijkstra_map.connect_points(1, 2, 1.0, false)
/// # produces the graph :
/// # 0 <---> 1 ----> 2
/// #    2.0     1.0
/// assert(dijkstra_map.connect_points(1, 3) == 1) # 3 does not exists in the map
/// ```
Connects the two given points.
Connects the two given points .
pub fn connect_points(
        &mut self,
        _owner: &Reference,
        source: i32,
        target: i32,
        #[opt] weight: Option<f32>,
        #[opt] bidirectional: Option<bool>,
    ) -> i64 {
        result_to_int(Ok(()))
    }
pub fn connect_points ( & mut self , _owner : & Reference , source : i32 , target : i32 , # [ opt ] weight : Option < f32 > , # [ opt ] bidirectional : Option < bool > , ) -> i64 { result_to_int ( Ok ( ( ) ) ) }
Connects the two given points.
Connects the two given points .
&mut self
_owner
&Reference
source
i32
target
i32
weight
Option<f32>
bidirectional
Option<bool>
&mut self
_owner
&Reference
source
i32
: source point of the connection.
: source point of the connection .
target
i32
: target point of the connection.
: target point of the connection .
weight
Option<f32>
: weight of the connection.
: weight of the connection .
bidirectional
Option<bool>
: wether or not the reciprocal connection should be
made. Defaults to [true].
: wether or not the reciprocal connection should be made . Defaults to [ true ] .
errors
Return [FAILED] if one of the points does not exists in the map.
Return [ FAILED ] if one of the points does not exists in the map .
example
```gdscript
var dijkstra_map = DijkstraMap.new()
dijkstra_map.add_point(0)
dijkstra_map.add_point(1)
dijkstra_map.add_point(2)
dijkstra_map.connect_points(0, 1, 2.0)
dijkstra_map.connect_points(1, 2, 1.0, false)
` ` ` gdscript var dijkstra_map = DijkstraMap . new () dijkstra_map . add_point ( 0 ) dijkstra_map . add_point ( 1 ) dijkstra_map . add_point ( 2 ) dijkstra_map . connect_points ( 0 1 2 . 0 ) dijkstra_map . connect_points ( 1 2 1 . 0 false )
produces the graph :
None
0 <---> 1 ----> 2
None
2.0     1.0
assert(dijkstra_map.connect_points(1, 3) == 1) # 3 does not exists in the map
```
assert ( dijkstra_map . connect_points ( 1 3 ) == 1 ) # 3 does not exists in the map ` ` `