HILA
Loading...
Searching...
No Matches
Array<n,m,T>

User guide for custom HILA Complex class

Acts as array class which stores data in a simple C style array. For detailed description and motivation see Array.

Construction

NOTE: n,m are integers and MyType is a HILA standard type or Complex.

The multiple ways of constructing an Array object can be viewed on the Object documentation page

A simple example of construction is:

Array<n,m,MyType> A(1); // Constructs array uniformly with scalar 1
Array1d<n,MyType> B(1); // Constructs 1D Array set to uniformly 1
Array1d<n,MyType> C(B); // Constructs by copying contents from B to A
Array type
Definition array.h:43

NOTE: Array1d is alias case of Array

Assignment

The implicit definition of assignment exist as

Assignment from Array:

// .
// . A_0 has values assigned to it
// .
Array<n,m,MyType> A; // undefined matrix
A = A_0; // Assignment from A_0

Initializer list:

Assignment from c++ initializer list.

A = {1, 0
0, 1};

Additionally there is a scalar assignment definition

Access

Example for Array2d:

T a = A.e(i,j); // i <= n, j <= m
T e(const int i, const int j) const
Standard array indexing operation for 2D Array.
Definition array.h:197

Example for Array1d:

T a = A.e(i) // i <= n

Mathematical methods

The arithmetic methods and arithmetic assignment methods hold allot of overloads depending on specific objects they are called for. All cases are documented and should be listed in order on the class page. These can be seen by following the links below.

Standard arithmetic methods

The following standard arithmetic methods are defined in the usual way for Complex numbers.

Arithmetic assignment methods

Comparison operators

Mathematical functions

Random number generators

There are two random number generators available for the Array type.