Skip to main content

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

NameDescription
[]Gets or sets the element at row inds[0] and column inds[1] of the BoolArray.

Members

NameDescription
allReturns true if all elements of the BoolArray are finite.
all_finiteReturns true if all elements of the BoolArray are finite.
anyReturns true if any element of the BoolArray is finite.
blockGet a block (sub-BoolArray) of the BoolArray.
bottom_left_cornerGet the bottom-left corner of the BoolArray.
bottom_right_cornerGet the bottom-right corner of the BoolArray.
bottom_rowsGet the bottom rows of the BoolArray.
colGet a column of the BoolArray.
colsReturns the number of columns of a BoolArray.
container_typeReturns the underlying container type of the BoolArray.
countCounts the number of finite elements in the BoolArray.
fillSets all elements of the BoolArray lhs to the constant c.
flattenFlattens the BoolArray in-place.
flattenedReturns a flattened copy of the BoolArray.
flipFlips the BoolArray along the specified dimension.
flippedReturns a BoolArray flipped along the specified dimension.
has_nanReturns true if the BoolArray has any NaN (not-a-number) elements.
is_approxReturns true if the BoolArray lhs is approximately equal to the BoolArray rhs.
is_approx_to_constantReturns true if all elements of the BoolArray lhs are approximately equal to the constant val, within the specified tolerance.
is_arrayWhether the container is an array (which supports elementwise operations).
is_boolWhether the underlying scalar type of the BoolArray is bool.
is_column_vectorReturns true if the container is a column-vector.
is_complexWhether the underlying scalar type of the BoolArray is complex.
is_constantReturns true if all elements of the BoolArray lhs are approximately the same, within the specified tolerance.
is_denseWhether the container is dense.
is_integerWhether the underlying scalar type of the BoolArray is integer.
is_matrixWhether the container is a matrix (which supports matrix algebra).
is_much_smaller_thanReturns true if the norm of the BoolArray lhs is much smaller than the norm of the BoolArray rhs, within the specified tolerance.
is_onesReturns true if all elements of the BoolArray lhs are 1.
is_realWhether the underlying scalar type of the BoolArray is real.
is_row_vectorReturns true if the container is a row-vector.
is_scalarReturns true if the container is a scalar (or a container containing a single element).
is_sparseWhether the container is sparse.
is_vectorReturns true if the container is a vector.
is_zeroReturns true if all elements of the BoolArray lhs are approximately 0, within the specified tolerance.
left_colsGet the left columns of the BoolArray.
listConverts the BoolArray arr to a list with the same elements.
lrflipFlips the BoolArray left-right (i.e. flips each row).
lrflippedReturns a BoolArray flipped left-right (rows; along the 1-st dimension).
middle_colsGet the middle columns of the BoolArray.
middle_rowsGet the middle rows of the BoolArray.
random_likeReturn a BoolArray of random numbers with the same shape and type as a given BoolArray.
realReturns the real component of a BoolArray.
replicateReplicates the elements of the BoolArray lhs in-place by the specified factors.
replicatedReplicates the elements of the BoolArray lhs by the specified factors.
reshapeReshapes the BoolArray in-place to the given dimensions.
reshapedReshapes the BoolArray to the given dimensions.
resizeResizes the BoolArray lhs to the given dimensions.
reverseReverses the BoolArray in place.
reversedReturns a reversed copy of the BoolArray.
right_colsGet the right columns of the BoolArray.
rotateReturns a (counter-clockwise) rotated copy of the BoolArray.
rotatedReturns a (counter-clockwise) rotated copy of the BoolArray.
rowGet a row of the BoolArray.
rowsReturns the number of rows of a BoolArray.
scalar_typeReturns the underlying scalar type of the BoolArray.
selectGets or sets the elements of the BoolArray using slices.
set_blockSets a block of the BoolArray lhs to the values in the BoolArray rhs.
set_bottom_left_cornerGet the bottom-left corner of the BoolArray.
set_bottom_right_cornerGet the bottom-right corner of the BoolArray.
set_bottom_rowsGet the bottom rows of the BoolArray.
set_colGet a column of the BoolArray.
set_constantSets all elements of the BoolArray lhs to the constant c.
set_left_colsGet the left columns of the BoolArray.
set_middle_colsGet the middle columns of the BoolArray.
set_middle_rowsGet the middle rows of the BoolArray.
set_onesSets all elements of the BoolArray lhs to 1.
set_randomSets all elements of the BoolArray lhs to random values on the interval [0, 1].
set_right_colsGet the right columns of the BoolArray.
set_rowGet a row of the BoolArray.
set_selectAssign the values of rhs to a selection of the BoolArray lhs.
set_top_left_cornerGet the top-left corner of the BoolArray.
set_top_right_cornerGet the top-right corner of the BoolArray.
set_top_rowsGet the top rows of the BoolArray.
set_zeroSets all elements of the BoolArray lhs to 0.
shapeReturns the shape of a BoolArray.
shiftReturns a (periodically) shifted copy of the BoolArray.
shiftedReturns a (periodically) shifted copy of the BoolArray.
sizeReturns the number of elements of a BoolArray.
top_left_cornerGet the top-left corner of the BoolArray.
top_right_cornerGet the top-right corner of the BoolArray.
top_rowsGet the top rows of the BoolArray.
transposeTransposes the BoolArray in place.
udflipFlips the BoolArray up-down (i.e. flips each column).
udflippedReturns a BoolArray flipped up-down (columns; along the 0-th dimension).
valueReturns the unique coefficient of a 1x1 BoolArray.