AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
IndexSet.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. 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#ifdef _MSC_VER
20# pragma warning(disable: 4714) // Disable warnings about not able to __forceinline
21#endif
22
23#include <agx/Vector.h>
25
26namespace agx
27{
28 class SparseRangeReal;
29
31 {
32 public:
33 struct Ipair
34 {
35 Ipair( UInt globalIndex, UInt localIndex ) : global( globalIndex ), local( localIndex ) {}
38 };
40
43
44 public:
46 {
48 FREE = 0,
49 LOWER = 2,
50 UPPER = 4,
51 IGNORE_INDEX = 8
52 };
53
54 public:
57
59
60 void resize( agx::UInt n );
61
62 void reset( const agx::SparseRangeReal& bounds );
63
64 void update( const agx::SparseRangeReal& bounds );
65
67
70
73
74 bool hasIgnoredIndices() const;
75
76 uint32_t hash();
77
78 private:
79 IVector m_full;
80 IVector m_ix;
81 mutable IxSet m_bag;
82 };
83
85 {
86 return m_ix[i];
87 }
88
90 {
91 return m_ix[i];
92 }
93}
BoolValarray BVector
Definition IndexSet.h:42
uint32_t hash()
agx::Vector< Ipair > IxSet
Definition IndexSet.h:39
bool hasIgnoredIndices() const
const agx::IndexSet::IVector & getFull() const
IntValarray IVector
Definition IndexSet.h:41
const agx::IndexSet::IVector & getIndexSet() const
void resize(agx::UInt n)
void update(const agx::SparseRangeReal &bounds)
IndexSet(agx::UInt n)
agx::Int & operator()(agx::UInt i)
Definition IndexSet.h:84
void reset(const agx::SparseRangeReal &bounds)
const agx::IndexSet::IxSet & getAtBounds() const
Essentially a sparse array of bounds.
Definition SparseTypes.h:74
#define AGX_FORCE_INLINE
Definition macros.h:58
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
std::valarray< agx::Int > IntValarray
uint64_t UInt
Definition Integer.h:27
std::valarray< agx::Bool > BoolValarray
Data type used for selecting sub-matrices.
int64_t Int
Definition Integer.h:28
Ipair(UInt globalIndex, UInt localIndex)
Definition IndexSet.h:35