Matrix🔗
-
class
visionappster.
Matrix
🔗 Wrappers for all va_matrix C types.
The matrix class is special in that each different content type is represented by a different class. You can construct matrices either the same way as other buffer-like data types by passing the generic Matrix constructor a type ID or by using the type-specific constructors directly. The following two lines are equivalent:
m = Matrix(Matrix.INT32, 1, 2) # using consistent syntax m = Matrix.Int32(1, 2) # using the real type class
-
class
visionappster.Matrix.
Int32
🔗 -
__getitem__
(self: visionappster.Matrix.Int32, index: Tuple[int, int]) → int🔗 Returns the element at the given index (row, column). For example,
m[0, 1]
returns the second element on the first row.
-
__init__
(*args, **kwargs)🔗 Overloaded function.
init(self: visionappster.Matrix.Int32) -> None
Initializes an empty matrix.
init(self: visionappster.Matrix.Int32, rows: int, columns: int) -> None
Creates a rows-by-columns matrix that is initialized to zeros.
init(self: visionappster.Matrix.Int32, buffer: buffer) -> None
Creates a deep copy of buffer. The number of dimensions in buffer must be two and its data type must match the type of the matrix.
init(self: visionappster.Matrix.Int32, shape: List[int]) -> None
Creates an all-zeros matrix with the given shape.
-
__setitem__
(self: visionappster.Matrix.Int32, index: Tuple[int, int], value: int) → None🔗 Sets the element at the given index (row, column) to value. For example,
m[0, 1] = 2
sets the second element on the first row to 2.
-
static
constant
(rows: int, columns: int, value: int) → visionappster.Matrix.Int32🔗 Creates a rows-by-columns matrix and sets every element to value.
-
static
identity
(size: int) → visionappster.Matrix.Int32🔗 Creates a size-by-size identity matrix.
-
static
uninitialized
(rows: int, columns: int) → visionappster.Matrix.Int32🔗 Creates an unitialized rows-by-columns matrix.
-
property
columns
🔗 The number of columns.
-
property
rows
🔗 The number of rows.
-
property
type
🔗 The type ID of the matrix.
-
-
class
visionappster.Matrix.
Float
🔗
-
class
visionappster.Matrix.
Double
🔗
-
class
visionappster.Matrix.
Bool
🔗
-
class
visionappster.Matrix.
FloatComplex
🔗
-
class
visionappster.Matrix.
DoubleComplex
🔗