File size: 1,302 Bytes
985c397 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from Base.Metadata import constmethod
from typing import Final, List, Any
@export(
Twin="Array2D",
TwinPointer="Array2D",
Namespace="Materials",
Include="Mod/Material/App/MaterialValue.h",
Delete=True,
Constructor=True,
)
class Array2D(BaseClass):
"""
2D Array of material properties.
Author: DavidCarter (dcarter@davidcarter.ca)
Licence: LGPL
"""
Array: Final[List] = ...
"""The 2 dimensional array."""
Dimensions: Final[int] = ...
"""The number of dimensions in the array, in this case 2."""
Rows: int = ...
"""The number of rows in the array."""
Columns: int = ...
"""The number of columns in the array."""
@constmethod
def getRow(self, value: Any, /) -> Any:
"""
Get the row given the first column value
"""
...
@constmethod
def getValue(self, row: int, column: int, /) -> Any:
"""
Get the value at the given row and column
"""
...
def setValue(self, row: int, column: int, value: Any, /):
"""
Set the value at the given row and column
"""
...
|