• Articles
  • Api Documentation
Show / Hide Table of Contents
  • AlchemyBow.Navigation
    • AlchemyNavigationSystem
    • BasicAgent
    • FacesHolder
    • NavigationAct
    • NavigationFaceWrapper
    • NavigationInfo
    • PathfindingRequest
    • PathfindingRequest.PathType
    • PathfindingRequest.Status
  • AlchemyBow.Navigation.BackgroundProcessing
    • BackgroundProcessor
    • BackgroundProcessor.States
    • BuildingProcess
    • IBackgroundCommand
    • PathfindingProcess
    • RegisterFaceCommand
    • UnregisterFaceCommand
  • AlchemyBow.Navigation.Collections
    • OrderedSet<T>
    • OrderedSetNode<T>
    • OrderedSetRangeComparer<T>
  • AlchemyBow.Navigation.DebugUnits
    • AlchemyNavigationSystemDebugUnit
    • CompositeSurfaceDrawer
    • GizmosSurfaceDrawer
    • ISurfaceDrawer
    • MinimalGizmosSurfaceDrawer
  • AlchemyBow.Navigation.HighLevel
    • MeshBasedBake
    • MeshBasedBakeGroup
    • MeshBasedBakeSettings
    • WorldMesh
  • AlchemyBow.Navigation.PropertyAttributes
    • AreaIndexAttribute
    • AreaMaskAttribute
    • LayerIndexAttribute
  • AlchemyBow.Navigation.Settings
    • AlchemyNavigationSettingsPreset
    • NavigationAreaSettings
    • NavigationLayerSettings
    • NavigationSettings
  • AlchemyBow.Navigation.Simple
    • SimpleAgent
  • AlchemyBow.Navigation.Simple.Elements
    • AvoidanceGroup
    • AvoidanceModifier
    • CachedFace
    • ISteeredBehaviour
    • MovementModifier
    • PathProgress
  • AlchemyBow.Navigation.Surfaces
    • Edge
    • Face
    • FacesByMagnitudeRangeComparer
    • NavigationSurface
    • SurfaceRaycastHit
    • Usage<TUser>
    • UsageTrackingObject<TUser>
    • Vertex
    • VertexByPositionComparer
  • AlchemyBow.Navigation.Surfaces.SafeAccess
    • IImmutableFace
    • SurfaceImmutableRaycastHit
  • AlchemyBow.Navigation.Utilities
    • ChannelUnwrapper
    • FaceAStar
    • FaceStarUnit
    • Funnel
    • ICommand

Class OrderedSet<T>

Represents a collection of objects that is maintained in sorted order and allows duplicates.

Inheritance
System.Object
OrderedSet<T>
Namespace: AlchemyBow.Navigation.Collections
Assembly: AlchemyBow.Navigation.dll
Syntax
public sealed class OrderedSet<T>
    where T : class, IComparable<T>
Type Parameters
Name Description
T

The type of elements in the set.

Remarks

This collection is a hybrid of an AVL tree and a linked list.

The AVL tree part was based on this cool article - https://www.geeksforgeeks.org/avl-tree-set-1-insertion/ .

Properties

| Improve this Doc View Source

Any

Determines whether the set contains any value.

Declaration
public bool Any { get; }
Property Value
Type Description
System.Boolean

true if the set contains any item; otherwise, false.

| Improve this Doc View Source

Min

Gets the first minimum value in the set.

Declaration
public T Min { get; }
Property Value
Type Description
T

The first minimum value in the set.

Methods

| Improve this Doc View Source

Add(T)

Adds an item to the set.

Declaration
public void Add(T value)
Parameters
Type Name Description
T value

The element to add.

| Improve this Doc View Source

BruteFind(Predicate<T>)

Searches for an item that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire set.

Declaration
public T BruteFind(Predicate<T> predicate)
Parameters
Type Name Description
System.Predicate<T> predicate

The predicate that defines the conditions of the element to search for.

Returns
Type Description
T

The first element that matches the conditions defined by the specified predicate, if found; otherwise, null.

| Improve this Doc View Source

Contains(T)

Determines whether the set contains a specific item.

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

The element to locate in the set.

Returns
Type Description
System.Boolean

true if the set contains item; otherwise, false.

| Improve this Doc View Source

Remove(T)

Removes a specified item from the set.

Declaration
public void Remove(T value)
Parameters
Type Name Description
T value

The element to remove.

| Improve this Doc View Source

ToArray()

Copies the elements of the set to a new array.

Declaration
public T[] ToArray()
Returns
Type Description
T[]

An array containing copies of the elements of the set.

| Improve this Doc View Source

UseRangeComparer(OrderedSetRangeComparer<T>)

Uses the comparer on the set.

Declaration
public void UseRangeComparer(OrderedSetRangeComparer<T> comparer)
Parameters
Type Name Description
OrderedSetRangeComparer<T> comparer

The comparer to use.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX