Class DVector<T>
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class DVector<T> : IEnumerable<T>, IEnumerable
Type Parameters
Constructors
DVector()
Declaration
DVector(T[])
Declaration
Parameters
Type |
Name |
Description |
T[] |
data |
|
DVector(DVector<T>)
Declaration
public DVector(DVector<T> copy)
Parameters
Type |
Name |
Description |
DVector<T> |
copy |
|
DVector(IEnumerable<T>)
Declaration
public DVector(IEnumerable<T> init)
Parameters
Properties
back
Declaration
public T back { get; set; }
Property Value
BlockCount
Declaration
public int BlockCount { get; }
Property Value
empty
Declaration
public bool empty { get; }
Property Value
front
Declaration
public T front { get; set; }
Property Value
Item[Int32]
Declaration
public T this[int i] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Property Value
Length
Declaration
public int Length { get; }
Property Value
MemoryUsageBytes
Declaration
public int MemoryUsageBytes { get; }
Property Value
size
Declaration
Property Value
Methods
Add(T)
Declaration
Parameters
Type |
Name |
Description |
T |
value |
|
Add(T, Int32)
Declaration
public void Add(T value, int nRepeat)
Parameters
Type |
Name |
Description |
T |
value |
|
Int32 |
nRepeat |
|
Add(T[])
Declaration
public void Add(T[] values)
Parameters
Type |
Name |
Description |
T[] |
values |
|
Add(T[], Int32)
Declaration
public void Add(T[] values, int nRepeat)
Parameters
Type |
Name |
Description |
T[] |
values |
|
Int32 |
nRepeat |
|
Apply(Action<T, Int32>)
Apply action to each element of vector. Iterates by block so this is more efficient.
Declaration
public void Apply(Action<T, int> applyF)
Parameters
ApplyReplace(Func<T, Int32, T>)
set vec[i] = applyF(vec[i], i) for each element of vector
Declaration
public void ApplyReplace(Func<T, int, T> applyF)
Parameters
Type |
Name |
Description |
Func<T, Int32, T> |
applyF |
|
BlockIterator()
Declaration
public IEnumerable<DVector<T>.DBlock> BlockIterator()
Returns
Clear()
Calls Array.Clear() on each block, which sets value to 'default' for type
Declaration
copy(DVector<T>)
Declaration
public void copy(DVector<T> copyIn)
Parameters
Type |
Name |
Description |
DVector<T> |
copyIn |
|
FastGetBuffer(DVector<Double>, Double*)
Declaration
public static void FastGetBuffer(DVector<double> v, double *pBuffer)
Parameters
FastGetBuffer(DVector<Int32>, Int32*)
Declaration
public static void FastGetBuffer(DVector<int> v, int *pBuffer)
Parameters
FastGetBuffer(DVector<Single>, Single*)
Declaration
public static void FastGetBuffer(DVector<float> v, float *pBuffer)
Parameters
GetBuffer()
Declaration
Returns
GetBuffer(T[])
Declaration
public void GetBuffer(T[] data)
Parameters
Type |
Name |
Description |
T[] |
data |
|
GetBufferCast<T2>()
Declaration
public T2[] GetBufferCast<T2>()
Returns
Type Parameters
GetBytes()
Declaration
Returns
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Initialize(T[])
Declaration
public void Initialize(T[] data)
Parameters
Type |
Name |
Description |
T[] |
data |
|
insert(T, Int32)
Declaration
public void insert(T value, int index)
Parameters
Type |
Name |
Description |
T |
value |
|
Int32 |
index |
|
insertAt(T, Int32)
Declaration
public void insertAt(T value, int index)
Parameters
Type |
Name |
Description |
T |
value |
|
Int32 |
index |
|
pop_back()
Declaration
push_back(T)
Declaration
public void push_back(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
resize(Int32)
Declaration
public void resize(int count)
Parameters
Type |
Name |
Description |
Int32 |
count |
|
ToArray()
Declaration
Returns
Implements