Skip to content

Commit 086da58

Browse files
committed
adding API reference pages for forest module to the main index_api.html
1 parent 5ed466e commit 086da58

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

docs/api/forest.html

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -474,35 +474,20 @@ <h3>Competitive Growth Pattern</h3>
474474
domain=domain,
475475
n_networks=3, # Three competing networks
476476
n_trees_per_network=[1, 1, 1],
477-
physical_clearance=0.3,
477+
physical_clearance=0.1,
478478
compete=True # Enable competition
479479
)
480480

481481
# Set starting points
482482
starts = [
483-
[np.array([0, -20, 0])], # Network 1
483+
[np.array([0, -20, 0])], # Network 1
484484
[np.array([17, 10, 0])], # Network 2
485485
[np.array([-17, 10, 0])] # Network 3
486486
]
487487

488488
forest.set_roots(start_points=starts)
489489

490-
# Track growth statistics
491-
stats = {'network_0': [], 'network_1': [], 'network_2': []}
492-
493-
# Competitive growth
494-
for step in range(150):
495-
forest.add(1, decay_probability=0.85) # Stronger decay
496-
497-
# Record statistics
498-
for i in range(3):
499-
stats[f'network_{i}'].append(forest.networks[i][0].n_terminals)
500-
501-
# Check dominance
502-
if step % 30 == 0:
503-
volumes = [forest.networks[i][0].tree_scale for i in range(3)]
504-
dominant = np.argmax(volumes)
505-
print(f"Step {step}: Network {dominant} dominates with volume {volumes[dominant]:.2f}")
490+
forest.add(50)
506491

507492
# Analyze competition results
508493
import matplotlib.pyplot as plt
@@ -527,9 +512,9 @@ <h2>Algorithms</h2>
527512
</div>
528513

529514
<div class="admonition note">
530-
<p><strong>Space Competition:</strong> When <code>compete=True</code>, trees compete for space through
531-
probability decay. Regions occupied by one network become less likely to be selected by others,
532-
creating natural territorial boundaries.</p>
515+
<p><strong>Space Sampling:</strong> When sampling space for new terminal selection the probability
516+
that a region which has been previously sampled is drawn again for another terminal decays by the
517+
indicated value to encourage the vascular growth into unvisited territories.</p>
533518
</div>
534519

535520
<div class="admonition warning">

docs/api/index_api.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,14 @@ <h4>Connection Methods</h4>
257257
</tbody>
258258
</table>
259259
</div>
260-
260+
<div class="api-classes">
261+
<h4>Main Classes</h4>
262+
<ul class="api-class-list">
263+
<li>
264+
<a href="forest.html"><code>Forest</code></a> - Main class for building connected vascular structures.
265+
</li>
266+
</ul>
267+
</div>
261268
<div class="api-example">
262269
<h4>Example Usage</h4>
263270
<pre data-copy><code class="language-python">from svv.forest import Forest

0 commit comments

Comments
 (0)