From 1031833fb04784908b7a28579af055f7264a2ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20H=C3=BCbner?= Date: Sun, 25 Aug 2019 21:30:52 +0200 Subject: allow to reserve space in OAHashMap explicitly and also in AStar. * also handle overflow occurring in _get_probe_length --- doc/classes/AStar.xml | 23 +++++++++++++++++++++++ doc/classes/AStar2D.xml | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) (limited to 'doc') diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 6d7adc9935..9ca09371dd 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -157,6 +157,13 @@ If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. + + + + + Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code]. + + @@ -178,6 +185,13 @@ [/codeblock] + + + + + Returns the number of points currently in the points pool. + + @@ -241,6 +255,15 @@ Removes the point associated with the given [code]id[/code] from the points pool. + + + + + + + Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. + + diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 9d51330139..0eff2bd560 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -134,6 +134,13 @@ If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. + + + + + Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code]. + + @@ -155,6 +162,13 @@ [/codeblock] + + + + + Returns the number of points currently in the points pool. + + @@ -218,6 +232,15 @@ Removes the point associated with the given [code]id[/code] from the points pool. + + + + + + + Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. + + -- cgit v1.2.3