IntegerArray
A IntegerArray.
Factories
array(const IntegerArray lhs) -> IntegerArray
Converts a container to an array.
Parameters
- lhs: The container.
array(const IntegerArray lhs, as_integer type) -> IntegerArray
Converts a container to an array.
Parameters
- lhs: The container.
- type: The type of the array to create.
array(const BoolArray lhs, as_integer type) -> IntegerArray
Converts a container to an array.
Parameters
- lhs: The container.
- type: The type of the array to create.
array(const List list, as_integer type) -> IntegerArray
Converts a list or list of list to an array.
Parameters
- list: The list containing the values.
- type: The type of the container to create.
filled(const List<integer> shape, bool value, as_integer | as_array type) -> IntegerArray
Creates a container with the specified shape and type, filled with with the specified value.
Parameters
- shape: The shape of the container to create.
- value: The value with which to fill the container.
- type: The type of the container to create.
filled(const List<integer> shape, integer value, as_integer | as_array type) -> IntegerArray
Creates a container with the specified shape and type, filled with with the specified value.
Parameters
- shape: The shape of the container to create.
- value: The value with which to fill the container.
- type: The type of the container to create.
filled_like(const IntegerArray lhs, integer c) -> IntegerArray
Return a container with the same shape and type as a given container, filled with a prescribed value.
Parameters
- lhs: The input container.
- c: The constant value to fill with.
filled_like(const IntegerArray lhs, bool c) -> IntegerArray
Return a container with the same shape and type as a given container, filled with a prescribed value.
Parameters
- lhs: The input container.
- c: The constant value to fill with.
identity(const List<integer> shape, as_integer | as_array type) -> IntegerArray
Creates an identity matrix (or array; possibly rectangular) with the specified shape and type.
Parameters
- shape: The shape of the container to create.
- type: The type of the container to create.
identity_like(const IntegerArray lhs) -> IntegerArray
Return the identity with the same shape and type as a given container.
Parameters
- lhs: The input container.
ones(const List<integer> shape, as_integer | as_array type) -> IntegerArray
Creates a container with the specified shape and type, filled with ones.
Parameters
- shape: The shape of the container to create.
- type: The type of the container to create.
ones_like(const IntegerArray lhs) -> IntegerArray
Return a container of ones with the same shape and type as a given container.
Parameters
- lhs: The input container.
random(const List<integer> shape, as_integer | as_array type) -> IntegerArray
Creates a container with the specified shape and type, filled with random values.
Parameters
- shape: The shape of the container to create.
- type: The type of the container to create.
uninitialized(const List<integer> shape, as_integer | as_array type) -> IntegerArray
Creates a container with the specified shape and type.
Parameters
- shape: The shape of the container to create.
- type: The type of the container to create.
uninitialized_like(const IntegerArray lhs) -> IntegerArray
Return a container of uninitialized values with the same shape and type as a given container.
Parameters
- lhs: The input container.
zeros(const List<integer> shape, as_integer | as_array type) -> IntegerArray
Creates a container with the specified shape and type, filled with zeros.
Parameters
- shape: The shape of the container to create.
- type: The type of the container to create.
zeros_like(const IntegerArray lhs) -> IntegerArray
Return a container of zeros with the same shape and type as a given container.
Parameters
- lhs: The input container.
Constructors
IntegerArray() -> IntegerArray
Creates an empty IntegerArray.
IntegerArray(integer m) -> IntegerArray
Creates an m x 1 IntegerArray. The array comes out uninitialized.
Parameters
- m: The number of rows.
IntegerArray(const List list) -> IntegerArray
Creates an IntegerArray from a list of lists of elements.
Parameters
- list: A list of elements to populate the column array.
IntegerArray(integer m, integer n) -> IntegerArray
Creates an m x n IntegerArray. The array comes out uninitialized.
Parameters
- m: The number of rows.
- n: The number of columns.
Symbols
| Name | Description |
|---|---|
[] | Gets or sets the element at row inds[0] and column inds[1] of the IntegerArray. |
Members
| Name | Description |
|---|---|
| all | Returns true if all elements of the IntegerArray are finite. |
| all_finite | Returns true if all elements of the IntegerArray are finite. |
| any | Returns true if any element of the IntegerArray is finite. |
| block | Get a block (sub-IntegerArray) of the IntegerArray. |
| bottom_left_corner | Get the bottom-left corner of the IntegerArray. |
| bottom_right_corner | Get the bottom-right corner of the IntegerArray. |
| bottom_rows | Get the bottom rows of the IntegerArray. |
| col | Get a column of the IntegerArray. |
| cols | Returns the number of columns of a IntegerArray. |
| container_type | Returns the underlying container type of the IntegerArray. |
| count | Counts the number of finite elements in the IntegerArray. |
| fill | Sets all elements of the IntegerArray lhs to the constant c. |
| flatten | Flattens the IntegerArray in-place. |
| flattened | Returns a flattened copy of the IntegerArray. |
| flip | Flips the IntegerArray along the specified dimension. |
| flipped | Returns a IntegerArray flipped along the specified dimension. |
| has_nan | Returns true if the IntegerArray has any NaN (not-a-number) elements. |
| is_approx | Returns true if the IntegerArray lhs is approximately equal to the IntegerArray rhs, within the specified tolerance. |
| is_approx_to_constant | Returns true if all elements of the IntegerArray lhs are approximately equal to the constant val. |
| is_array | Whether the container is an array (which supports elementwise operations). |
| is_bool | Whether the underlying scalar type of the IntegerArray is bool. |
| is_column_vector | Returns true if the container is a column-vector. |
| is_complex | Whether the underlying scalar type of the IntegerArray is complex. |
| is_constant | Returns true if all elements of the IntegerArray lhs are the same. |
| is_dense | Whether the container is dense. |
| is_integer | Whether the underlying scalar type of the IntegerArray is integer. |
| is_matrix | Whether the container is a matrix (which supports matrix algebra). |
| is_much_smaller_than | Returns true if the norm of the IntegerArray lhs is much smaller than the norm of the IntegerArray rhs, within the specified tolerance. |
| is_ones | Returns true if all elements of the IntegerArray lhs are 1. |
| is_real | Whether the underlying scalar type of the IntegerArray is real. |
| is_row_vector | Returns true if the container is a row-vector. |
| is_scalar | Returns true if the container is a scalar (or a container containing a single element). |
| is_sparse | Whether the container is sparse. |
| is_vector | Returns true if the container is a vector. |
| is_zero | Returns true if all elements of the IntegerArray lhs are 0. |
| left_cols | Get the left columns of the IntegerArray. |
| list | Converts the IntegerArray arr to a list with the same elements. |
| lrflip | Flips the IntegerArray left-right (i.e. flips each row). |
| lrflipped | Returns a IntegerArray flipped left-right (rows; along the 1-st dimension). |
| middle_cols | Get the middle columns of the IntegerArray. |
| middle_rows | Get the middle rows of the IntegerArray. |
| random_like | Return a IntegerArray of random numbers with the same shape and type as a given IntegerArray. |
| real | Returns the real component of a IntegerArray. |
| replicate | Replicates the elements of the IntegerArray lhs in-place by the specified factors. |
| replicated | Replicates the elements of the IntegerArray lhs by the specified factors. |
| reshape | Reshapes the IntegerArray in-place to the given dimensions. |
| reshaped | Reshapes the IntegerArray to the given dimensions. |
| resize | Resizes the IntegerArray lhs to the given dimensions. |
| reverse | Reverses the IntegerArray in place. |
| reversed | Returns a reversed copy of the IntegerArray. |
| right_cols | Get the right columns of the IntegerArray. |
| rotate | Returns a (counter-clockwise) rotated copy of the IntegerArray. |
| rotated | Returns a (counter-clockwise) rotated copy of the IntegerArray. |
| row | Get a row of the IntegerArray. |
| rows | Returns the number of rows of a IntegerArray. |
| scalar_type | Returns the underlying scalar type of the IntegerArray. |
| select | Gets or sets the elements of the IntegerArray using slices. |
| set_block | Sets a block of the IntegerArray lhs to the values in the IntegerArray rhs. |
| set_bottom_left_corner | Get the bottom-left corner of the IntegerArray. |
| set_bottom_right_corner | Get the bottom-right corner of the IntegerArray. |
| set_bottom_rows | Get the bottom rows of the IntegerArray. |
| set_col | Get a column of the IntegerArray. |
| set_constant | Sets all elements of the IntegerArray lhs to the constant c. |
| set_left_cols | Get the left columns of the IntegerArray. |
| set_middle_cols | Get the middle columns of the IntegerArray. |
| set_middle_rows | Get the middle rows of the IntegerArray. |
| set_ones | Sets all elements of the IntegerArray lhs to 1. |
| set_random | Sets all elements of the IntegerArray lhs to random values on the interval [0, 1]. |
| set_right_cols | Get the right columns of the IntegerArray. |
| set_row | Get a row of the IntegerArray. |
| set_select | Assign the values of rhs to a selection of the IntegerArray lhs. |
| set_top_left_corner | Get the top-left corner of the IntegerArray. |
| set_top_right_corner | Get the top-right corner of the IntegerArray. |
| set_top_rows | Get the top rows of the IntegerArray. |
| set_zero | Sets all elements of the IntegerArray lhs to 0. |
| shape | Returns the shape of a IntegerArray. |
| shift | Returns a (periodically) shifted copy of the IntegerArray. |
| shifted | Returns a (periodically) shifted copy of the IntegerArray. |
| size | Returns the number of elements of a IntegerArray. |
| swap | Swaps the contents of the IntegerArray lhs and rhs. |
| top_left_corner | Get the top-left corner of the IntegerArray. |
| top_right_corner | Get the top-right corner of the IntegerArray. |
| top_rows | Get the top rows of the IntegerArray. |
| transpose | Transposes the IntegerArray in place. |
| udflip | Flips the IntegerArray up-down (i.e. flips each column). |
| udflipped | Returns a IntegerArray flipped up-down (columns; along the 0-th dimension). |
| value | Returns the unique coefficient of a 1x1 IntegerArray. |