HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_KnotVectorT< T > Class Template Reference

#include <GA_KnotVector.h>

+ Inheritance diagram for GA_KnotVectorT< T >:

Public Types

using value_type = T
 
- Public Types inherited from UT_ValArray< T >
typedef int(* Comparator )(const T *, const T *)
 
- Public Types inherited from UT_Array< T >
typedef T value_type
 
typedef int(* Comparator )(const T *, const T *)
 
typedef base_iterator< T, true > iterator
 
typedef base_iterator< const T,
true > 
const_iterator
 
typedef base_iterator< T, false > reverse_iterator
 
typedef base_iterator< const T,
false > 
const_reverse_iterator
 
typedef const_iterator traverser
 

Public Member Functions

 GA_KnotVectorT (const GA_KnotVectorT &a)
 
 GA_KnotVectorT (unsigned int sz, unsigned int count)
 
 GA_KnotVectorT (unsigned int sz=0)
 
 ~GA_KnotVectorT ()
 
GA_KnotVectorToperator= (const GA_KnotVectorT &rhs)
 
bool jsonSave (UT_JSONWriter &w) const
 
bool jsonSave (UT_JSONValue &w) const
 Save to a JSON value. More...
 
bool jsonLoad (UT_JSONParser &p)
 Load from a JSON stream. More...
 
bool jsonLoad (UT_JSONParser &p, const UT_JSONValue &v)
 Load from a JSON value. More...
 
void copyMemory (const GA_KnotVectorT &from)
 
int shift (GA_Size srcIdx, GA_Size destIdx, GA_Size howMany)
 
const TgetValue (GA_Size index) const
 
void setValue (GA_Size index, fpreal v)
 
void reserve (int size)
 
GA_Size insertKnot (GA_Size idx)
 
GA_Size insertKnot (fpreal t, GA_Size i)
 
- Public Member Functions inherited from UT_ValArray< T >
 UT_ValArray (const UT_ValArray< T > &src)
 
 UT_ValArray (const UT_Array< T > &src)
 
 UT_ValArray (UT_ValArray< T > &&src) noexcept
 
 UT_ValArray (UT_Array< T > &&src) noexcept
 
 UT_ValArray (exint capacity=0)
 
 UT_ValArray (exint capacity, exint entries)
 
 UT_ValArray (std::initializer_list< T > init)
 
UT_ValArrayoperator= (const UT_ValArray< T > &src)
 
UT_ValArrayoperator= (const UT_Array< T > &src)
 
UT_ValArrayoperator= (std::initializer_list< T > src)
 
UT_ValArrayoperator= (UT_ValArray< T > &&src)
 
UT_ValArrayoperator= (UT_Array< T > &&src)
 
void sortAscending ()
 
exint uniqueSortedFindAscending (const T &item) const
 
exint uniqueSortedInsertAscending (const T &t)
 
template<typename T_ = T, typename = AllowSortedSet<T_>>
bool hasSortedSubset (const UT_ValArray< T > &other) const
 
bool hasSortedSubset (const UT_ValArray< T > &other, Comparator compare) const
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
bool hasSortedSubset (const UT_Array< T > &other, ComparatorBool is_less) const
 
template<typename T_ = T, typename = AllowSortedSet<T_>>
void sortedUnion (const UT_ValArray< T > &other)
 
void sortedUnion (const UT_ValArray< T > &other, Comparator compare)
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
void sortedUnion (const UT_ValArray< T > &other, ComparatorBool is_less)
 
template<typename T_ = T, typename = AllowSortedSet<T_>>
void sortedUnion (const UT_ValArray< T > &other, UT_ValArray< T > &result) const
 
void sortedUnion (const UT_ValArray< T > &other, UT_ValArray< T > &result, Comparator compare) const
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
void sortedUnion (const UT_ValArray< T > &other, UT_ValArray< T > &result, ComparatorBool is_less) const
 
template<typename T_ = T, typename = AllowSortedSet<T_>>
void sortedIntersection (const UT_ValArray< T > &other)
 
void sortedIntersection (const UT_ValArray< T > &other, Comparator compare)
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
void sortedIntersection (const UT_ValArray< T > &other, ComparatorBool is_less)
 
template<typename T_ = T, typename = AllowSortedSet<T_>>
void sortedIntersection (const UT_ValArray< T > &other, UT_ValArray< T > &result) const
 
void sortedIntersection (const UT_ValArray< T > &other, UT_ValArray< T > &result, Comparator compare) const
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
void sortedIntersection (const UT_ValArray< T > &other, UT_ValArray< T > &result, ComparatorBool is_less) const
 
template<typename T_ = T, typename = AllowSortedSet<T_>>
void sortedSetDifference (const UT_ValArray< T > &other)
 
void sortedSetDifference (const UT_ValArray< T > &other, Comparator compare)
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
void sortedSetDifference (const UT_ValArray< T > &other, ComparatorBool is_less)
 
template<typename T_ = T, typename = AllowSortedSet<T_>>
void sortedSetDifference (const UT_ValArray< T > &other, UT_ValArray< T > &result) const
 
void sortedSetDifference (const UT_ValArray< T > &other, UT_ValArray< T > &result, Comparator compare) const
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
void sortedSetDifference (const UT_ValArray< T > &other, UT_ValArray< T > &result, ComparatorBool is_less) const
 
int removeZeros ()
 
void collapse ()
 
T sum () const
 Functions which are only specialized for int{32,64}, fpreal{32,64}. More...
 
void display () const
 Prints the constents of the array. More...
 
- Public Member Functions inherited from UT_Array< T >
 UT_Array (const UT_Array< T > &a)
 
 UT_Array (UT_Array< T > &&a) noexcept
 Move constructor. Steals the working data from the original. More...
 
 UT_Array (const exint capacity, const exint size)
 Construct based on given capacity and size. More...
 
 UT_Array (const exint capacity=0)
 Construct based on given capacity with a size of 0. More...
 
 UT_Array (std::initializer_list< T > init)
 
 ~UT_Array ()
 
void swap (UT_Array< T > &other)
 
exint append ()
 
exint append (const T &t)
 
exint append (T &&t)
 
exint append (const T &t, bool check_dup)
 
void append (const T *pt, exint count)
 
void appendMultiple (const T &t, exint count)
 
exint insert (exint index)
 
exint insert (const T &t, exint i)
 
exint insert (T &&t, exint i)
 
template<typename... S>
exint emplace_back (S &&...s)
 
exint uniqueSortedInsert (const T &t, Comparator compare)
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
exint uniqueSortedInsert (const T &t, ComparatorBool is_less={})
 
exint uniqueSortedInsert (T &&t, Comparator compare)
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
exint uniqueSortedFind (const T &item, ComparatorBool is_less={}) const
 
exint uniqueSortedFind (const T &item, Comparator compare) const
 
template<typename ComparatorBool = Less<T>>
void merge (const UT_Array< T > &other, int direction, bool allow_dups, ComparatorBool is_less={})
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
bool hasSortedSubset (const UT_Array< T > &other, ComparatorBool is_less={}) const
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
void sortedUnion (const UT_Array< T > &other, ComparatorBool is_less={})
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
void sortedUnion (const UT_Array< T > &other, UT_Array< T > &result, ComparatorBool is_less={}) const
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
void sortedIntersection (const UT_Array< T > &other, ComparatorBool is_less={})
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
void sortedIntersection (const UT_Array< T > &other, UT_Array< T > &result, ComparatorBool is_less={}) const
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
void sortedSetDifference (const UT_Array< T > &other, ComparatorBool is_less={})
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
void sortedSetDifference (const UT_Array< T > &other, UT_Array< T > &result, ComparatorBool is_less={}) const
 
bool hasSortedSubset (const UT_Array< T > &other, Comparator compare) const
 
void sortedUnion (const UT_Array< T > &other, Comparator compare)
 
void sortedUnion (const UT_Array< T > &other, UT_Array< T > &result, Comparator compare) const
 
void sortedIntersection (const UT_Array< T > &other, Comparator compare)
 
void sortedIntersection (const UT_Array< T > &other, UT_Array< T > &result, Comparator compare) const
 
void sortedSetDifference (const UT_Array< T > &other, Comparator compare)
 
void sortedSetDifference (const UT_Array< T > &other, UT_Array< T > &result, Comparator compare) const
 
exint heapPush (const T &t, Comparator compare)
 
T heapPop (Comparator compare)
 
const TheapMax () const
 
exint concat (const UT_Array< T > &a)
 Takes another T array and concatenate it onto my end. More...
 
exint concat (UT_Array< T > &&a) noexcept
 Takes another T array and concatenate it onto my end. More...
 
exint multipleInsert (exint index, exint count)
 Insert an element "count" times at the given index. Return the index. More...
 
exint insertAt (const T &t, exint index)
 
bool isValidIndex (exint index) const
 Return true if given index is valid. More...
 
template<typename S >
exint findAndRemove (const S &s)
 
exint removeIndex (exint index)
 
SYS_FORCE_INLINE void removeLast ()
 
void removeRange (exint begin_i, exint end_i)
 
void extractRange (exint begin_i, exint end_i, UT_Array< T > &dest)
 
template<typename IsEqual >
exint removeIf (IsEqual is_equal)
 
template<typename IsEqual >
void collapseIf (IsEqual is_equal)
 Remove all matching elements. Also sets the capacity of the array. More...
 
void move (exint src_idx, exint dst_idx, exint how_many)
 
void cycle (exint how_many)
 Cyclically shifts the entire array by how_many. More...
 
void constant (const T &v)
 Quickly set the array to a single value. More...
 
void zero ()
 Zeros the array if a POD type, else trivial constructs if a class type. More...
 
template<typename S >
exint find (const S &s, exint start=0) const
 
exint sortedFind (const T &t, Comparator compare) const
 
void reverse ()
 Reverses the array by swapping elements in mirrored locations. More...
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
void sort (ComparatorBool is_less={})
 Sort using std::sort with bool comparator. Defaults to operator<(). More...
 
void sort (Comparator compare)
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
void stdsort (ComparatorBool is_less)
 Sort using std::sort. The ComparatorBool uses the less-than semantics. More...
 
template<typename ComparatorBool = Less<T>>
void stableSort (ComparatorBool is_less={})
 
template<typename ComparatorBool >
void stableSortRange (ComparatorBool is_less, exint start, exint end)
 Like stableSort, but operates on a subset of the array. More...
 
template<typename I , typename ComparatorBool >
void stableSortIndices (UT_Array< I > &indices, ComparatorBool is_less) const
 
template<typename I , typename ComparatorBool >
void stableArgSort (UT_Array< I > &indices, ComparatorBool is_less) const
 
template<typename K , typename ComparatorBool >
void stableSortByKey (const UT_Array< K > &keys, ComparatorBool is_less)
 
exint sortedRemoveDuplicates ()
 
template<typename CompareEqual >
exint sortedRemoveDuplicatesIf (CompareEqual compare_equal)
 
template<typename ComparatorBool = Less<T>>
exint sortAndRemoveDuplicates (ComparatorBool is_less={})
 
template<typename ComparatorBool = Less<T>>
T selectNthLargest (exint idx, ComparatorBool is_less={})
 
void setCapacity (exint new_capacity)
 
void setCapacityIfNeeded (exint min_capacity)
 
void bumpCapacity (exint min_capacity)
 
void bumpSize (exint newsize)
 
void bumpEntries (exint newsize)
 
exint capacity () const
 
exint size () const
 
exint entries () const
 Alias of size(). size() is preferred. More...
 
bool isEmpty () const
 Returns true iff there are no occupied elements in the array. More...
 
int64 getMemoryUsage (bool inclusive=false) const
 
void setSize (exint newsize)
 
void setSizeIfNeeded (exint minsize)
 
void entries (exint newsize)
 Alias of setSize(). setSize() is preferred. More...
 
void setSizeNoInit (exint newsize)
 
void shrinkToFit ()
 shrinks the capacity to the current size More...
 
void setSizeAndShrink (exint new_size)
 convenience method to set size and shrink-to-fit in a single call More...
 
void truncate (exint maxsize)
 Decreases, but never expands, to the given maxsize. More...
 
void clear ()
 Resets list to an empty list. More...
 
UT_Array< T > & operator= (const UT_Array< T > &a)
 
UT_Array< T > & operator= (std::initializer_list< T > ilist)
 Replace the contents with those from the initializer_list ilist. More...
 
UT_Array< T > & operator= (UT_Array< T > &&a)
 Move the contents of array a to this array. More...
 
bool operator== (const UT_Array< T > &a) const
 
bool operator!= (const UT_Array< T > &a) const
 
template<typename ComparatorBool , typename = IsBoolComp<ComparatorBool>>
bool isEqual (const UT_Array< T > &a, ComparatorBool is_equal) const
 
int isEqual (const UT_Array< T > &a, Comparator compare) const
 
Toperator() (exint i)
 
const Toperator() (exint i) const
 
Toperator[] (exint i)
 
const Toperator[] (exint i) const
 
TforcedRef (exint i)
 
T forcedGet (exint i) const
 
Tlast ()
 
const Tlast () const
 
exint apply (int(*apply_func)(T &t, void *d), void *d)
 
template<typename BinaryOp >
T accumulate (const T &init_value, BinaryOp add) const
 
TgetArray () const
 
const TgetRawArray () const
 
Tarray ()
 
const Tarray () const
 
Tdata ()
 
const Tdata () const
 
TaliasArray (T *newdata)
 
iterator begin ()
 
iterator end ()
 End iterator. More...
 
const_iterator begin () const
 
const_iterator end () const
 End const iterator. Consider using it.atEnd() instead. More...
 
reverse_iterator rbegin ()
 Begin iterating over the array in reverse. More...
 
reverse_iterator rend ()
 End reverse iterator. More...
 
const_reverse_iterator rbegin () const
 Begin iterating over the array in reverse. More...
 
const_reverse_iterator rend () const
 End reverse iterator. Consider using it.atEnd() instead. More...
 
UT_IteratorRange< iteratorrange ()
 
UT_IteratorRange< const_iteratorrange () const
 
UT_IteratorRange
< reverse_iterator
rrange ()
 
UT_IteratorRange
< const_reverse_iterator
rrange () const
 
void removeItem (const reverse_iterator &it)
 Remove item specified by the reverse_iterator. More...
 
void unsafeShareData (UT_Array< T > &src)
 
void unsafeShareData (T *src, exint srcsize)
 
void unsafeShareData (T *src, exint size, exint capacity)
 
void unsafeClearData ()
 
bool isHeapBuffer () const
 Returns true if the data used by the array was allocated on the heap. More...
 
exint sortedInsert (const T &t, Comparator compare)
 
template<typename ComparatorBool = Less<T>, typename = IsBoolComp<ComparatorBool>>
exint sortedInsert (const T &t, ComparatorBool is_less={})
 
exint index (const T &t) const
 
exint safeIndex (const T &t) const
 

Additional Inherited Members

- Static Public Member Functions inherited from UT_ValArray< T >
static bool compareElementsBool (const T &a, const T &b)
 
static int compareElements (const T *a, const T *b)
 
static bool isElementZero (const T &a)
 
- Protected Member Functions inherited from UT_Array< T >
 UT_Array (const UT_ArrayCT::ExternalCapacity, T *external_data, const exint external_capacity)
 
 UT_Array (const UT_ArrayCT::ExternalMove, T *external_data, const exint external_capacity, UT_Array &&a)
 
template<typename S >
exint appendImpl (S &&s)
 
template<typename S >
exint insertImpl (S &&s, exint index)
 Similar to appendImpl() but for insertion. More...
 
template<typename S >
exint uniqueSortedInsertImpl (S &&s, Comparator compare)
 
template<typename First , typename... Rest>
void validateEmplaceArgs (First &&first, Rest &&...rest) const
 
void validateEmplaceArgs () const
 Base case for validateEmplaceArgs(). More...
 
- Static Protected Member Functions inherited from UT_Array< T >
static constexpr
SYS_FORCE_INLINE bool 
isPOD ()
 
template<typename... S>
static void construct (T &dst, S &&...s)
 
static void copyConstruct (T &dst, const T &src)
 

Detailed Description

template<typename T>
class GA_KnotVectorT< T >

Definition at line 31 of file GA_KnotVector.h.

Member Typedef Documentation

template<typename T>
using GA_KnotVectorT< T >::value_type = T

Definition at line 34 of file GA_KnotVector.h.

Constructor & Destructor Documentation

template<typename T>
GA_KnotVectorT< T >::GA_KnotVectorT ( const GA_KnotVectorT< T > &  a)
inline

Definition at line 36 of file GA_KnotVector.h.

template<typename T>
GA_KnotVectorT< T >::GA_KnotVectorT ( unsigned int  sz,
unsigned int  count 
)
inline

Definition at line 39 of file GA_KnotVector.h.

template<typename T>
GA_KnotVectorT< T >::GA_KnotVectorT ( unsigned int  sz = 0)
inlineexplicit

Definition at line 42 of file GA_KnotVector.h.

template<typename T>
GA_KnotVectorT< T >::~GA_KnotVectorT ( )

Member Function Documentation

template<typename T>
void GA_KnotVectorT< T >::copyMemory ( const GA_KnotVectorT< T > &  from)
inline

Definition at line 76 of file GA_KnotVector.h.

template<typename T>
const T& GA_KnotVectorT< T >::getValue ( GA_Size  index) const
inline

Definition at line 85 of file GA_KnotVector.h.

template<typename T>
GA_Size GA_KnotVectorT< T >::insertKnot ( GA_Size  idx)
inline

Definition at line 98 of file GA_KnotVector.h.

template<typename T>
GA_Size GA_KnotVectorT< T >::insertKnot ( fpreal  t,
GA_Size  i 
)
inline

Definition at line 100 of file GA_KnotVector.h.

template<typename T>
bool GA_KnotVectorT< T >::jsonLoad ( UT_JSONParser p)

Load from a JSON stream.

template<typename T>
bool GA_KnotVectorT< T >::jsonLoad ( UT_JSONParser p,
const UT_JSONValue v 
)

Load from a JSON value.

template<typename T>
bool GA_KnotVectorT< T >::jsonSave ( UT_JSONWriter w) const

Save data to a JSON stream.

JSON Schema: GA_KnotVector

{
"name" : "GA_KnotVector",
"description" : "An knot vector array.",
"type" : "array",
"items" : "number",
}
See Also
JSON_FileFormat
template<typename T>
bool GA_KnotVectorT< T >::jsonSave ( UT_JSONValue w) const

Save to a JSON value.

template<typename T>
GA_KnotVectorT& GA_KnotVectorT< T >::operator= ( const GA_KnotVectorT< T > &  rhs)
inline

Definition at line 47 of file GA_KnotVector.h.

template<typename T>
void GA_KnotVectorT< T >::reserve ( int  size)
inline

Definition at line 95 of file GA_KnotVector.h.

template<typename T>
void GA_KnotVectorT< T >::setValue ( GA_Size  index,
fpreal  v 
)
inline

Definition at line 89 of file GA_KnotVector.h.

template<typename T>
int GA_KnotVectorT< T >::shift ( GA_Size  srcIdx,
GA_Size  destIdx,
GA_Size  howMany 
)

The documentation for this class was generated from the following file: