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