MemoryMatrices#
- class caf.mat.matrices.MemoryMatrices(segmentation_, zoning, type_, matrices=None, *, name=None)[source]#
Bases:
MatricesBaseStores matrices in-memory, in a dictionary.
Intended primarily for use with few smaller matrices.
- Parameters:
segmentation – Segmentation for the matrices.
zoning (ZoningSystem) – ZoningSystem for all the matrices.
type (MatrixType) – Type of the matrices.
matrices (list[Matrix] | None) – Optional list of any existing matrices already loaded,
get_matrix()will raise a KeyError when attempting to access a matrix which isn’t given here or withsave_matrix().segmentation_ (Segmentation)
type_ (MatrixType)
name (str | None)
Attributes
Name of the matrices.
Methods
__init__(segmentation_, zoning, type_[, ...])exists()Check if matrices exist for all slices.
get_matrix(slice_)Get in-memory matrix.
new(name, *[, segmentation_, zoning, type_])Create a new instance of the matrices class with a new name.
set_matrix(matrix, slice_)Store matrix in class (in-memory).
Attributes Documentation
- name#
Name of the matrices.