Interface IOmnitreePoints<T, Axis1>
Inheritance base for 1D omnitrees that store points.
Inherited Members
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public interface IOmnitreePoints<T, Axis1> : IOmnitree<T, Axis1>, IOmnitree<T>, IDataStructure<T>, ISteppable<T>, System.Collections.Generic.IEnumerable<T>, DataStructure.ICountable, DataStructure.IAddable<T>, DataStructure.IClearable
Type Parameters
Name | Description |
---|---|
T | The type of items to store in the omnitree. |
Axis1 | The type 1D axis. |
Properties
| Improve this Doc View SourceDimensions
The number of dimensions in this tree.
Declaration
int Dimensions { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Axis1]
Steps through the values at a given location.
Declaration
Action<Action<T>> this[Axis1 axis1] { get; }
Parameters
Type | Name | Description |
---|---|---|
Axis1 | axis1 | The coordinate along the 1D axis. |
Property Value
Type | Description |
---|---|
Action<Action<T>> | A Stepper of the items at the given coordinates. |
Locate
The delegate being used by the omnitree to locate items in 1D space.
Declaration
Omnitree.Location<T, Axis1> Locate { get; }
Property Value
Type | Description |
---|---|
Omnitree.Location<T, Axis1> |
Methods
| Improve this Doc View SourceCountSubSpace(Omnitree.Bound<Axis1>, Omnitree.Bound<Axis1>)
Counts the number of items in a sub space.
Declaration
int CountSubSpace(Omnitree.Bound<Axis1> min1, Omnitree.Bound<Axis1> max1)
Parameters
Type | Name | Description |
---|---|---|
Omnitree.Bound<Axis1> | min1 | The minimum coordinate of the space along the 1 axis. |
Omnitree.Bound<Axis1> | max1 | The maximum coordinate of the space along the 1 axis. |
Returns
Type | Description |
---|---|
System.Int32 | The number of items in the provided sub space. |
Remove(Axis1)
Removes all the items in a given space.
Declaration
void Remove(Axis1 axis1)
Parameters
Type | Name | Description |
---|---|---|
Axis1 | axis1 | The coordinate along the 1D axis. |
Remove(Axis1, Predicate<T>)
Removes all the items in a given space where equality is met.
Declaration
void Remove(Axis1 axis1, Predicate<T> where)
Parameters
Type | Name | Description |
---|---|---|
Axis1 | axis1 | The coordinate along the 1D axis. |
Predicate<T> | where | The equality constraint of the removal. |
Remove(Omnitree.Bound<Axis1>, Omnitree.Bound<Axis1>)
Removes all the items in a given space.
Declaration
void Remove(Omnitree.Bound<Axis1> min1, Omnitree.Bound<Axis1> max1)
Parameters
Type | Name | Description |
---|---|---|
Omnitree.Bound<Axis1> | min1 | The minimum coordinate of the space along the 1 axis. |
Omnitree.Bound<Axis1> | max1 | The maximum coordinate of the space along the 1 axis. |
Remove(Omnitree.Bound<Axis1>, Omnitree.Bound<Axis1>, Predicate<T>)
Removes all the items in a given space where predicate is met.
Declaration
void Remove(Omnitree.Bound<Axis1> min1, Omnitree.Bound<Axis1> max1, Predicate<T> where)
Parameters
Type | Name | Description |
---|---|---|
Omnitree.Bound<Axis1> | min1 | The minimum coordinate of the space along the 1 axis. |
Omnitree.Bound<Axis1> | max1 | The maximum coordinate of the space along the 1 axis. |
Predicate<T> | where | The predicate constraint of the removal. |
Stepper(Action<T>, Axis1)
Performs and specialized traversal of the structure and performs a delegate on every node within the provided dimensions.
Declaration
void Stepper(Action<T> step, Axis1 axis1)
Parameters
Type | Name | Description |
---|---|---|
Action<T> | step | The step function to perform on all items in the tree within the given bounds. |
Axis1 | axis1 | The coordinate along the 1D axis. |
Stepper(Action<T>, Omnitree.Bound<Axis1>, Omnitree.Bound<Axis1>)
Performs and specialized traversal of the structure and performs a delegate on every node within the provided dimensions.
Declaration
void Stepper(Action<T> step, Omnitree.Bound<Axis1> min1, Omnitree.Bound<Axis1> max1)
Parameters
Type | Name | Description |
---|---|---|
Action<T> | step | The step function to perform on all items in the tree within the given bounds. |
Omnitree.Bound<Axis1> | min1 | The minimum coordinate of the space along the 1 axis. |
Omnitree.Bound<Axis1> | max1 | The maximum coordinate of the space along the 1 axis. |
Stepper(Func<T, StepStatus>, Axis1)
Performs and specialized traversal of the structure and performs a delegate on every node within the provided dimensions.
Declaration
StepStatus Stepper(Func<T, StepStatus> step, Axis1 axis1)
Parameters
Type | Name | Description |
---|---|---|
Func<T, StepStatus> | step | The step function to perform on all items in the tree within the given bounds. |
Axis1 | axis1 | The coordinate along the 1D axis. |
Returns
Type | Description |
---|---|
StepStatus |
Stepper(Func<T, StepStatus>, Omnitree.Bound<Axis1>, Omnitree.Bound<Axis1>)
Performs and specialized traversal of the structure and performs a delegate on every node within the provided dimensions.
Declaration
StepStatus Stepper(Func<T, StepStatus> step, Omnitree.Bound<Axis1> min1, Omnitree.Bound<Axis1> max1)
Parameters
Type | Name | Description |
---|---|---|
Func<T, StepStatus> | step | The step function to perform on all items in the tree within the given bounds. |
Omnitree.Bound<Axis1> | min1 | The minimum coordinate of the space along the 1 axis. |
Omnitree.Bound<Axis1> | max1 | The maximum coordinate of the space along the 1 axis. |
Returns
Type | Description |
---|---|
StepStatus |
Update()
Iterates through the entire tree and ensures each item is in the proper leaf.
Declaration
void Update()
Update(Omnitree.Bound<Axis1>, Omnitree.Bound<Axis1>)
Iterates through the provided dimensions and ensures each item is in the proper leaf.
Declaration
void Update(Omnitree.Bound<Axis1> min1, Omnitree.Bound<Axis1> max1)
Parameters
Type | Name | Description |
---|---|---|
Omnitree.Bound<Axis1> | min1 | The minimum coordinate of the space along the 1 axis. |
Omnitree.Bound<Axis1> | max1 | The maximum coordinate of the space along the 1 axis. |