1.1. Namespace Array¶
-
class
KhivaArray
: public IDisposable¶ Khiva KhivaArray Class.
Public Types
-
enum
DType
¶ KHIVA array available types.
Values:
-
F32
¶ Floating point of single precision. Khiva.DType.
-
C32
¶ Complex floating point of single precision. Khiva.DType.
-
F64
¶ Floating point of double precision. Khiva.DType.
-
C64
¶ Complex floating point of double precision. Khiva.DType.
-
B8
¶ Boolean. Khiva.DType.
-
S32
¶ 32 bits Int. Khiva.DType.
-
U32
¶ 32 bits Unsigned Int. Khiva.DType.
-
U8
¶ 8 bits Unsigned Int. Khiva.DType.
-
S64
¶ 64 bits Integer. Khiva.DType.
-
U64
¶ 64 bits Unsigned Int. Khiva.DType.
-
S16
¶ 16 bits Int. Khiva.DType.
-
U16
¶ 16 bits Unsigned Int. Khiva.DType.
-
Public Functions
-
void Khiva.KhivaArray.Dispose()
Dispose the KhivaArray.
-
T [] Khiva.KhivaArray.GetData1D< T >()
Get the data of a 4 dimensional khiva array.
- Return
- 1 dimensional array containing the data of the khiva array.
- Template Parameters
T
: The type of the elements of the array.
-
T [,] Khiva.KhivaArray.GetData2D< T >()
Get the data of a 2 dimensional khiva array.
- Return
- 2 dimensional array containing the data of the khiva array.
- Template Parameters
T
: The type of the elements of the array.
-
T [,,] Khiva.KhivaArray.GetData3D< T >()
Get the data of a 3 dimensional khiva array.
- Return
- 3 dimensional array containing the data of the khiva array.
- Template Parameters
T
: The type of the elements of the array.
-
T [,,,] Khiva.KhivaArray.GetData4D< T >()
Get the data of a 4 dimensional khiva array.
- Return
- 4 dimensional array containing the data of the khiva array.
- Template Parameters
T
: The type of the elements of the array.
-
void Khiva.KhivaArray.Display()
Displays an KhivaArray.
-
override bool Khiva.KhivaArray.Equals(object o)
Equals object method
- Return
- Parameters
o
: Object to compare
-
override int Khiva.KhivaArray.GetHashCode()
GetHashCode object method
- Return
- Hashcode of the KhivaArray
-
KhivaArray Khiva.KhivaArray.Transpose(bool conjugate = false)
Transposes array.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
conjugate
: If true a conjugate transposition is performed.
-
KhivaArray Khiva.KhivaArray.Col(int index)
Retrieves a given column of array.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
index
: The column to be retrieved.
-
KhivaArray Khiva.KhivaArray.Cols(int first, int last)
Retrieves a subset of columns of array, starting at first and finishing at last, both inclusive.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
first
: Start of the subset of columns to be retrieved.last
: End of the subset of columns to be retrieved.
-
KhivaArray Khiva.KhivaArray.Row(int index)
Retrieves a given row of array.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
index
: The row to be retrieved.
-
KhivaArray Khiva.KhivaArray.Rows(int first, int last)
Retrieves a subset of rows of array, starting at first and finishing at last, both inclusive.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
first
: Start of the subset of rows to be retrieved.last
: End of the subset of rows to be retrieved.
-
KhivaArray Khiva.KhivaArray.MatMul(KhivaArray rhs)
Performs a matrix multiplication of lhs and rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
rhs
: Right-hand side KHIVA array for the operation.
-
KhivaArray Khiva.KhivaArray.Copy()
Performs a deep copy of array.
- Return
- KHIVA KhivaArray which contains a copy of array.
-
KhivaArray Khiva.KhivaArray.As(int type)
Changes the type of array.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
type
: Target type of the output array.
Property
-
property
Khiva::KhivaArray::Reference
Getters and setters of the Reference parameter.
-
property
Khiva::KhivaArray::Dims
Gets the KhivaArray dimensions.
-
property
Khiva::KhivaArray::ArrayType
Gets the type of the array.
Public Static Functions
-
static KhivaArray Khiva.KhivaArray.CreateZeros< T >(long [] dims, uint nDims, bool doublePrecision = false)
Creates KhivaArray of zeros.
- Return
- KhivaArray created.
- Template Parameters
T
: Type of the elements of the array.
- Parameters
dims
: Cardinality of dimensions of the data.nDims
: Number of dimensions of the data.doublePrecision
: If Complex array has double precision. Default to false.
-
static KhivaArray Khiva.KhivaArray.Create(IntPtr reference)
Creates a khiva array object from reference.
- Return
- KhivaArray created.
- Parameters
reference
: Reference from which create the array.
-
static KhivaArray Khiva.KhivaArray.Create(KhivaArray other)
Creates a khiva array object from copy.
- Return
- KhivaArray created.
- Parameters
other
: KhivaArray to copy.
-
static unsafe KhivaArray Khiva.KhivaArray.Create< T >(T [] values, bool doublePrecision = false)
Creates a khiva array object.
- Return
- KhivaArray created.
- Template Parameters
T
: Type of the elements of the array.
- Parameters
values
: 1 dimensional array with the data.doublePrecision
: If Complex array has double precision. Default to false.
-
static unsafe KhivaArray Khiva.KhivaArray.Create< T >(T values[,], bool doublePrecision = false)
Creates a khiva array object.
- Return
- KhivaArray created.
- Template Parameters
T
: Type of the elements of the array.
- Parameters
values
: 2 dimensional array with the data.doublePrecision
: If Complex array has double precision. Default to false.
-
static unsafe KhivaArray Khiva.KhivaArray.Create< T >(T values[,,], bool doublePrecision = false)
Creates a khiva array object.
- Return
- KhivaArray created
- Template Parameters
T
: Type of the elements of the array.
- Parameters
values
: 3 dimensional array with the data.doublePrecision
: If Complex array has double precision. Default to false.
-
static unsafe KhivaArray Khiva.KhivaArray.Create< T >(T values[,,,], bool doublePrecision = false)
Creates a khiva array object.
- Return
- KhivaArray created.
- Template Parameters
T
: Type of the elements of the array.
- Parameters
values
: 4 dimensional array with the data.doublePrecision
: If Complex array has double precision. Default to false.
-
static KhivaArray Khiva.KhivaArray.operator+(KhivaArray lhs, KhivaArray rhs)
Adds two arrays.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator*(KhivaArray lhs, KhivaArray rhs)
Multiplies two arrays.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator-(KhivaArray lhs, KhivaArray rhs)
Subtracts two arrays.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator/(KhivaArray lhs, KhivaArray rhs)
Divides two arrays.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator%(KhivaArray lhs, KhivaArray rhs)
Performs the modulo operation of lhs by rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.Pow(KhivaArray lhs, KhivaArray rhs)
Powers lhs with rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator &(KhivaArray lhs, KhivaArray rhs)
Performs an AND operation (element-wise) with lhs and rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator|(KhivaArray lhs, KhivaArray rhs)
Performs an OR operation (element-wise) with lhs and rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator^(KhivaArray lhs, KhivaArray rhs)
Performs an eXclusive-OR operation (element-wise) with lhs and rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator<<(KhivaArray lhs, int shift)
Performs a left bit shift operation (element-wise) to array as many times as specified in the parameter n.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: array KHIVA KhivaArray to shift.shift
: Number of bits to be shifted.
-
static KhivaArray Khiva.KhivaArray.operator>>(KhivaArray lhs, int shift)
Performs a right bit shift operation (element-wise) to array as many times as specified in the parameter n.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: array KHIVA KhivaArray to shift.shift
: Number of bits to be shifted.
-
static KhivaArray Khiva.KhivaArray.operator-(KhivaArray rhs)
Unary minus of one array.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator!(KhivaArray lhs)
Logical NOT operation to array.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: KHIVA KhivaArray to negate.
-
static KhivaArray Khiva.KhivaArray.operator<(KhivaArray lhs, KhivaArray rhs)
Compares (element-wise) if lhs is lower than rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator>(KhivaArray lhs, KhivaArray rhs)
Compares (element-wise) if lhs is greater than rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator<=(KhivaArray lhs, KhivaArray rhs)
Compares (element-wise) if lhs is lower or equal than rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator>=(KhivaArray lhs, KhivaArray rhs)
Compares (element-wise) if lhs is greater or equal than rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator==(KhivaArray lhs, KhivaArray rhs)
Compares (element-wise) if rhs is equal to rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
-
static KhivaArray Khiva.KhivaArray.operator!=(KhivaArray lhs, KhivaArray rhs)
Compares (element-wise) if lhs is not equal to rhs.
- Return
- KHIVA KhivaArray with the result of this operation.
- Parameters
lhs
: Left-hand side KHIVA array for the operation.rhs
: Right-hand side KHIVA array for the operation.
Private Functions
-
void Khiva.KhivaArray.CleanUp()
Clean up the array.
-
Khiva.KhivaArray.~KhivaArray()
Destroy KhivaArray.
-
Khiva.KhivaArray.KhivaArray()
Creates empty KhivaArray.
-
void Khiva.KhivaArray.DeleteArray()
Decreases the references count of the given array.
-
enum