Show / Hide Table of Contents

Class BTreeLinked<T, TCompare>

B-Tree Data structure.

Inheritance
System.Object
BTreeLinked<T, TCompare>
Implements
IDataStructure<T>
ISteppable<T>
System.Collections.Generic.IEnumerable<T>
DataStructure.IAddable<T>
DataStructure.IRemovable<T>
DataStructure.ICountable
DataStructure.IClearable
DataStructure.IAuditable<T>
DataStructure.IComparing<T, TCompare>
ICloneable<BTreeLinked<T, TCompare>>
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public class BTreeLinked<T, TCompare> : object, IDataStructure<T>, ISteppable<T>, System.Collections.Generic.IEnumerable<T>, DataStructure.IAddable<T>, DataStructure.IRemovable<T>, DataStructure.ICountable, DataStructure.IClearable, DataStructure.IAuditable<T>, DataStructure.IComparing<T, TCompare>, ICloneable<BTreeLinked<T, TCompare>> where TCompare : struct, IFunc<T, T, CompareResult>
Type Parameters
Name Description
T

The type to store

TCompare

The type that is comparing T values.

Constructors

| Improve this Doc View Source

BTreeLinked(Byte, TCompare)

Creates a B-Tree having nodes of given maximum size. Maximum size must be even

Declaration
public BTreeLinked(byte maxdegree, TCompare compare = default(TCompare))
Parameters
Type Name Description
System.Byte maxdegree

The maximum degree/children a node can have. Must be even

TCompare compare

The function for comparing T values.

Properties

| Improve this Doc View Source

Compare

Gets the value of the comparer that is comparing T values.

Declaration
public TCompare Compare { get; }
Property Value
Type Description
TCompare
| Improve this Doc View Source

Count

Gets the current count of the data structure.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

MaxDegree

The fixed size of a node within this tree

Declaration
public byte MaxDegree { get; }
Property Value
Type Description
System.Byte

Methods

| Improve this Doc View Source

Clear()

Returns the data structure to an empty state.

Declaration
public void Clear()
| Improve this Doc View Source

Contains(T)

Checks if the data structure contains a value.

Declaration
public bool Contains(T value)
Parameters
Type Name Description
T value

The value to look for in the data structure.

Returns
Type Description
System.Boolean

True if the value exists in the data structure. False if not.

Implements

IDataStructure<T>
ISteppable<T>
System.Collections.Generic.IEnumerable<>
DataStructure.IAddable<T>
DataStructure.IRemovable<T>
DataStructure.ICountable
DataStructure.IClearable
DataStructure.IAuditable<T>
DataStructure.IComparing<T, TCompare>
ICloneable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX