Table of Contents

Class MarchingSquares.CxFastList<T>

Namespace
Alis.Core.Physic.Common.TextureTools
Assembly
Alis.dll

Designed as a complete port of CxFastList from CxStd.

internal class MarchingSquares.CxFastList<T>

Type Parameters

T

Inheritance

Inherited Members

Fields

_count

The count

private int _count

Field Value

int

_head

The head

private CxFastListNode<T> _head

Field Value

CxFastListNode<T>

Methods

Add(T)

add object to list (O(1))

public CxFastListNode<T> Add(T value)

Parameters

value T

Returns

CxFastListNode<T>

Begin()

Iterator to start of list (O(1))

public CxFastListNode<T> Begin()

Returns

CxFastListNode<T>

Clear()

empty the list (O(1) if CxMixList, O(n) otherwise)

public void Clear()

Empty()

whether the list is empty (O(1))

public bool Empty()

Returns

bool

End()

Iterator to end of list (O(1))

public CxFastListNode<T> End()

Returns

CxFastListNode<T>

Erase(CxFastListNode<T>, CxFastListNode<T>)

removes the element pointed to by 'node' with 'prev' being the previous iterator, returning an iterator to the element following that of 'node' (O(1))

public CxFastListNode<T> Erase(CxFastListNode<T> prev, CxFastListNode<T> node)

Parameters

prev CxFastListNode<T>
node CxFastListNode<T>

Returns

CxFastListNode<T>

Find(T)

Finds the value

public CxFastListNode<T> Find(T value)

Parameters

value T

The value

Returns

CxFastListNode<T>

A cx fast list node of t

Front()

Returns first element of list (O(1))

public T Front()

Returns

T

GetListOfElements()

Gets the list of elements

public List<T> GetListOfElements()

Returns

List<T>

The list

Has(T)

returns true if 'value' is an element of the list (O(n))

public bool Has(T value)

Parameters

value T

Returns

bool

Insert(CxFastListNode<T>, T)

insert object after 'node' returning an iterator to the inserted object.

public CxFastListNode<T> Insert(CxFastListNode<T> node, T value)

Parameters

node CxFastListNode<T>
value T

Returns

CxFastListNode<T>

Pop()

pop element from head of list (O(1)) Note: this does not return the object popped! There is good reason to this, and it regards the Alloc list variants which guarantee objects are released to the object pool. You do not want to retrieve an element through pop or else that object may suddenly be used by another piece of code which retrieves it from the object pool.

public CxFastListNode<T> Pop()

Returns

CxFastListNode<T>

Remove(T)

remove object from list, returns true if an element was removed (O(n))

public bool Remove(T value)

Parameters

value T

Returns

bool

Size()

computes size of list (O(n))

public int Size()

Returns

int