Skip to content

Commit 65980e2

Browse files
committed
doc
1 parent c95fd7c commit 65980e2

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/semantic_world/spatial_types/derivatives.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,24 @@ def range(cls, start: Derivatives, stop: Derivatives, step: int = 1):
2929

3030
@dataclass
3131
class DerivativeMap(Generic[T]):
32+
"""
33+
A container class that maps derivatives (position, velocity, acceleration, jerk) to values of type T.
34+
35+
This class provides a structured way to store and access different orders of derivatives
36+
using properties. Each derivative order can hold a value of type T or None.
37+
38+
Type Parameters:
39+
T: The type of values stored for each derivative order.
40+
41+
Attributes:
42+
data (List[Optional[T]]): Internal list storing the derivative values, initialized with None values.
43+
"""
44+
3245
data: List[Optional[T]] = field(default_factory=lambda: [None] * len(Derivatives))
46+
"""
47+
Internal list storing the derivative values, initialized with None values.
48+
Order corresponds to the order of the Derivatives enum.
49+
"""
3350

3451
@property
3552
def position(self) -> T:

0 commit comments

Comments
 (0)