Header menu logo FSharp.Data.Adaptive

ChangeableIndexList<'T> Type

Changeable adaptive list that allows mutation by user-code and implements alist.

Constructors

Constructor Description

ChangeableIndexList()

Full Usage: ChangeableIndexList()

Returns: ChangeableIndexList<'T>

Creates a new empty list.

Returns: ChangeableIndexList<'T>

ChangeableIndexList(elements)

Full Usage: ChangeableIndexList(elements)

Parameters:
    elements : 'T seq

Returns: ChangeableIndexList<'T>

Creates a new list initially holding the given elements.

elements : 'T seq
Returns: ChangeableIndexList<'T>

ChangeableIndexList(elements)

Full Usage: ChangeableIndexList(elements)

Parameters:
Returns: ChangeableIndexList<'T>

Creates a new list initially holding the given elements.

elements : IndexList<'T>
Returns: ChangeableIndexList<'T>

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:
    element : 'T

Returns: Index

Appends an element to the list and returns its Index.

element : 'T
Returns: Index

this.AddRange

Full Usage: this.AddRange

Parameters:
    elements : 'T seq

Appends all given elements to the list.

elements : 'T seq

this.Append

Full Usage: this.Append

Parameters:
    element : 'T

Returns: Index

Appends an element to the list and returns its Index.

element : 'T
Returns: Index

this.Clear

Full Usage: this.Clear

Clears the list.

this.Count

Full Usage: this.Count

Returns: int

the number of elements currently in the list.

Returns: int

this.GetEnumerator

Full Usage: this.GetEnumerator

Returns: IndexListEnumerator<'T>
Returns: IndexListEnumerator<'T>

this.InsertAfter

Full Usage: this.InsertAfter

Parameters:
    index : Index
    element : 'T

Returns: Index

Inserts an element directly after the given index and returns the new index for the element.

index : Index
element : 'T
Returns: Index

this.InsertAt

Full Usage: this.InsertAt

Parameters:
    index : int
    element : 'T

Returns: Index

Inserts an element at the given position in the list and returns its Index. Note that the position can be equal to the count of the list.

index : int
element : 'T
Returns: Index

this.InsertBefore

Full Usage: this.InsertBefore

Parameters:
    index : Index
    element : 'T

Returns: Index

Inserts an element directly before the given index and returns the new index for the element.

index : Index
element : 'T
Returns: Index

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

is the list currently empty?

Returns: bool

this[index]

Full Usage: this[index]

Returns: Index

Gets or sets the element associated to index.

Returns: Index

this[index]

Full Usage: this[index]

Returns: int

Gets or sets an element in the list at the given index.

Returns: int

this.MaxIndex

Full Usage: this.MaxIndex

Returns: Index

The largest index contained in the list (or Index.zero if empty)

Returns: Index

this.MinIndex

Full Usage: this.MinIndex

Returns: Index

The smallest index contained in the list (or Index.zero if empty)

Returns: Index

this.Neighbours

Full Usage: this.Neighbours

Parameters:
Returns: (Index * 'T) option * 'T option * (Index * 'T) option

Gets the neigbour elements and self (if existing) and returns (previous, self, next) as a triple.

ref : Index
Returns: (Index * 'T) option * 'T option * (Index * 'T) option

this.NewIndexAfter

Full Usage: this.NewIndexAfter

Parameters:
Returns: Index

Returns a new (currently unused) index directly after the given one.

ref : Index
Returns: Index

this.NewIndexBefore

Full Usage: this.NewIndexBefore

Parameters:
Returns: Index

Returns a new (currently unused) index directly before the given one.

ref : Index
Returns: Index

this.Perform

Full Usage: this.Perform

Parameters:

Performs the given Operations on the List.

arg0 : IndexListDelta<'T>

this.Prepend

Full Usage: this.Prepend

Parameters:
    element : 'T

Returns: Index

Prepends an element to the list and returns its Index.

element : 'T
Returns: Index

this.Remove

Full Usage: this.Remove

Parameters:
Returns: bool

Removes the given index from the list and returns true if the element was deleted.

index : Index
Returns: bool

this.RemoveAt

Full Usage: this.RemoveAt

Parameters:
    index : int

Returns: Index

Removes the element at the given position and returns its Index.

index : int
Returns: Index

this.TryAt

Full Usage: this.TryAt

Parameters:
    index : int

Returns: 'T option

Tries to get the element at the given position.

index : int
Returns: 'T option

this.TryGet

Full Usage: this.TryGet

Parameters:
Returns: 'T option

Gets the (optional) element associated to the given Index.

index : Index
Returns: 'T option

this.TryGetIndex

Full Usage: this.TryGetIndex

Parameters:
    index : int

Returns: Index option

Tries to get the Index associated to the given position.

index : int
Returns: Index option

this.TryGetNext

Full Usage: this.TryGetNext

Parameters:
Returns: (Index * 'T) option

Tries to get the (index, value) for element directly after the given ref.

ref : Index
Returns: (Index * 'T) option

this.TryGetPrev

Full Usage: this.TryGetPrev

Parameters:
Returns: (Index * 'T) option

Tries to get the (index, value) for element directly before the given ref.

ref : Index
Returns: (Index * 'T) option

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
    target : 'T seq

Returns: bool

Sets the current state as Sequence.

target : 'T seq
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
Returns: bool

Sets the current state as Sequence.

target : 'T seq
arg1 : IEqualityComparer<'T>
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
    target : 'T[]

Returns: bool

Sets the current state as Array.

target : 'T[]
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
Returns: bool

Sets the current state as Array.

target : 'T[]
arg1 : IEqualityComparer<'T>
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
    target : 'T list

Returns: bool

Sets the current state as List.

target : 'T list
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
Returns: bool

Sets the current state as List.

target : 'T list
arg1 : IEqualityComparer<'T>
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
Returns: bool

Sets the current state as List.

target : IndexList<'T>
Returns: bool

this.UpdateTo

Full Usage: this.UpdateTo

Parameters:
    target : IndexList<'T2>
    init : 'T2 -> 'T
    update : 'T -> 'T2 -> 'T

Sets the current state as List applying the init function to new elements and the update function to existing ones.

target : IndexList<'T2>
init : 'T2 -> 'T
update : 'T -> 'T2 -> 'T

this.Value

Full Usage: this.Value

Gets or sets the value for the list.

Type something to start searching.