AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
LSquareComplianceMatrix.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agx/Integer.h>
20#include <agx/Real.h>
21
22namespace agx
23{
28 {
29 public:
36 : m_data( data )
37 , m_size( size )
38 {
39 }
40
46 inline Real& operator[]( UInt32 col )
47 {
48 agxAssert( col < m_size );
49 return m_data[ col ];
50 }
51
57 inline Real operator[]( UInt32 col ) const
58 {
59 agxAssert( col < m_size );
60 return m_data[ col ];
61 }
62
66 inline UInt32 size() const
67 {
68 return m_size;
69 }
70
71 private:
72 Real* m_data;
73 UInt32 m_size;
74 };
75
85 {
86 public:
94 : m_data( data )
95 , m_size( size )
96 , m_ld( ld )
97 {
98 }
99
106 {
107 agxAssert( row < m_size );
108 return LSquareComplianceMatrixRow{ m_data + row * m_ld, row + 1u };
109 }
110
114 inline UInt32 size() const { return m_size; }
115
116 private:
117 Real* m_data;
118 UInt32 m_size;
119 UInt32 m_ld;
120 };
121}
Interface to a row in the compliance matrix.
LSquareComplianceMatrixRow(Real *data, UInt32 size)
Construct given row data and number of accessible columns.
Real & operator[](UInt32 col)
Write access to value in given column.
Real operator[](UInt32 col) const
Read access to value in given column.
Interface to the lower triangle of the compliance matrix block in the system matrix.
LSquareComplianceMatrix(Real *data, UInt32 size, UInt32 ld)
Construct given data, number of rows/columns and leading dimension.
LSquareComplianceMatrixRow operator[](UInt32 row) const
Read/write access to given row number.
#define agxAssert(expr)
Definition: debug.h:143
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:32
double Real
Definition: Real.h:41