@@ -11,34 +11,34 @@ tree-like data structures. It relies on
1111[ AbstractTrees.jl] ( https://github.com/JuliaCollections/AbstractTrees.jl ) for
1212various utilities related to traversing trees and tree iterators.
1313
14- The module defines the concrete type [ ` ClusterTree ` ] (@ref Trees. ClusterTree)
14+ The module defines the concrete type [ ` ClusterTree ` ] (@ref ClusterTree)
1515which can be used to partition elements of geometrical nature into a
1616hierarchical structure according to an [ ` AbstractSplitter ` ] (@ref
17- Trees. AbstractSplitter). This structure is currently used by the
17+ AbstractSplitter). This structure is currently used by the
1818[ HMatrices.jl] ( https://github.com/WaveProp/HMatrices ) and
1919[ IFGF.jl] ( https://github.com/WaveProp/IFGF ) .
2020
2121Tree-like data structures should inherit from [ ` AbstractTree ` ] (@ref
22- Trees. AbstractTree), and are expected to implement the ` children ` and ` parent `
22+ AbstractTree), and are expected to implement the ` children ` and ` parent `
2323methods. Currently, one concrete implementation of [ ` AbstracTree ` ] (@ref
24- Trees. AbstractTree) is provided by ` WavePropBase ` : the [ ` ClusterTree ` ] (@ref
25- Trees. ClusterTree).
24+ AbstractTree) is provided by ` WavePropBase ` : the [ ` ClusterTree ` ] (@ref
25+ ClusterTree).
2626
2727## ` ClusterTree `
2828
29- A [ ` ClusterTree{T,S,D} ` ] (@ref Trees. ClusterTree) is a parametric type used to
29+ A [ ` ClusterTree{T,S,D} ` ] (@ref ClusterTree) is a parametric type used to
3030hierarchically cluster elements of type ` T ` into container of type ` S ` .
3131Additionally, each node of the tree has a data field of type ` D ` (defaults to
32- ` Nothing ` ) that can be used to store additional node-specific information. The
32+ ` Nothing ` ) that can be used to store additional node-specific information. The
3333elements contained in a given node can be retrieved using ` elements(node) ` ,
3434which returns an iterable collection of elements of type ` T ` .
3535
3636To construct a ` ClusterTree ` , you must pass the elements and an
37- [ ` AbstractSplitter ` ] (@ref Trees. AbstractSplitter) implementing the desired
37+ [ ` AbstractSplitter ` ] (@ref AbstractSplitter) implementing the desired
3838splitting strategy and stopping criterion: concrete subtypes of
3939` AbstractSplitter ` should implement the
40- [ ` should_split(clt,spl::AbstractSplitter) ` ] (@ref Trees. should_split) and
41- [ ` split!(clt,splt::AbstractSplitter) ` ] (@ref Trees. split!) methods. Refer to the documentation
40+ [ ` should_split(clt,spl::AbstractSplitter) ` ] (@ref should_split) and
41+ [ ` split!(clt,splt::AbstractSplitter) ` ] (@ref split!) methods. Refer to the documentation
4242of each concrete subtype of ` AbstractSplitter ` (you can type
4343` subtypes(AbstractSplitter) ` to see what they are) for more information about
4444the available splitting strategies and parameters.
@@ -47,9 +47,9 @@ An example of how to construct a `ClusterTree` is shown below:
4747
4848``` @example cluster-tree
4949using WavePropBase
50- pts = rand(Geometry .Point2D,100)
51- splitter = Trees.GeometricMinimalSplitter (nmax=5)
52- clt = Trees .ClusterTree(pts,splitter)
50+ pts = rand(WavePropBase .Point2D,100)
51+ splitter = WavePropBase.CardinalitySplitter (nmax=5)
52+ clt = WavePropBase .ClusterTree(pts,splitter)
5353```
5454
5555` clt ` now represents the root of the tree. To visualize ` clt ` as a node, you can
@@ -59,7 +59,7 @@ of `clt`, you can do:
5959``` @example cluster-tree
6060using Plots
6161plotlyjs() # hide
62- plot(WavePropBase.IO. PlotTree(),clt;predicate=Trees .isleaf)
62+ plot(WavePropBase.PlotTree(),clt;predicate=WavePropBase .isleaf)
6363savefig("clt1.png")
6464```
6565
@@ -68,16 +68,16 @@ savefig("clt1.png")
6868Changing the clustering strategy is as simple as:
6969
7070``` @example cluster-tree
71- splitter = Trees .DyadicSplitter(nmax=5)
72- clt = Trees .ClusterTree(pts,splitter)
73- plot(WavePropBase.IO. PlotTree(),clt)
71+ splitter = WavePropBase .DyadicSplitter(nmax=5)
72+ clt = WavePropBase .ClusterTree(pts,splitter)
73+ plot(WavePropBase.PlotTree(),clt)
7474savefig("clt2.png")
7575```
7676
7777![ cluster tree] ( clt2.png )
7878
7979In the example above the elements were simply points, which were sorted into
80- container of [ ` HyperRectangle ` ] (@ref Interpolation. HyperRectangle) type according to
80+ container of [ ` HyperRectangle ` ] (@ref HyperRectangle) type according to
8181their coordinates. You can sort elements of other types as long as they
8282implement the ` center ` method; for instance, you may build a ` ClusterTree ` of
8383triangle elements as long as you extend the method ` center ` from ` WavePropBase `
@@ -89,10 +89,5 @@ permuted internally so each node of the tree stores a contiguous subset of
8989` ClusterTree ` object. Passing the keyword argument ` copy_elements=false ` will
9090skip the ` deepcopy ` , and mutate instead the ` els ` argument passed. The
9191permutation of ` els ` performed during the tree construction can be recovered
92- using [ ` loc2glob ` ] (@ref Trees. loc2glob).
92+ using [ ` loc2glob ` ] (@ref loc2glob).
9393
94- ## Index
95-
96- ``` @index
97- Modules = [WavePropBase.Trees]
98- ```
0 commit comments