All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
functions.h File Reference
+ Include dependency graph for functions.h:

Go to the source code of this file.

Macros

#define VT_FUNCTIONS_MAX_ARGS   6
 
#define BOOST_PP_ITERATION_PARAMS_1
 
#define VTFUNCTION_BOOL(funcname, op)
 

Functions

template<typename T >
VtArray< T > VtEqual (VtArray< T > const &a, VtArray< T > const &b)
 Returns a bool array specifying, element-by-element, if the two inputs contain equal values. More...
 
template<typename T >
VtArray< T > VtEqual (T const &a, VtArray< T > const &b)
 
template<typename T >
VtArray< T > VtEqual (VtArray< T > const &a, T const &b)
 
template<typename T >
VtArray< T > VtNotEqual (VtArray< T > const &a, VtArray< T > const &b)
 Returns a bool array specifying, element-by-element, if the two inputs contain inequal values. More...
 
template<typename T >
VtArray< T > VtNotEqual (T const &a, VtArray< T > const &b)
 
template<typename T >
VtArray< T > VtNotEqual (VtArray< T > const &a, T const &b)
 
template<typename T >
VtArray< T > VtGreater (VtArray< T > const &a, VtArray< T > const &b)
 Returns a bool array specifying, element-by-element, if the first input contains values greater than those in the second input. More...
 
template<typename T >
VtArray< T > VtGreater (T const &a, VtArray< T > const &b)
 
template<typename T >
VtArray< T > VtGreater (VtArray< T > const &a, T const &b)
 
template<typename T >
VtArray< T > VtLess (VtArray< T > const &a, VtArray< T > const &b)
 Returns a bool array specifying, element-by-element, if the first input contains values less than those in the second input. More...
 
template<typename T >
VtArray< T > VtLess (T const &a, VtArray< T > const &b)
 
template<typename T >
VtArray< T > VtLess (VtArray< T > const &a, T const &b)
 
template<typename T >
VtArray< T > VtGreaterOrEqual (VtArray< T > const &a, VtArray< T > const &b)
 Returns a bool array specifying, element-by-element, if the first input contains values greater than or equal to those in the second input. More...
 
template<typename T >
VtArray< T > VtGreaterOrEqual (T const &a, VtArray< T > const &b)
 
template<typename T >
VtArray< T > VtGreaterOrEqual (VtArray< T > const &a, T const &b)
 
template<typename T >
VtArray< T > VtLessOrEqual (VtArray< T > const &a, VtArray< T > const &b)
 Returns a bool array specifying, element-by-element, if the first input contains values less than or equal to those in the second input. More...
 
template<typename T >
VtArray< T > VtLessOrEqual (T const &a, VtArray< T > const &b)
 
template<typename T >
VtArray< T > VtLessOrEqual (VtArray< T > const &a, T const &b)
 
template<typename T >
VtArray< T > VtCat (VtArray< T > const &a0, VtArray< T > const &a1,...VtArray< T > const &aN)
 Concatenates arrays. More...
 
template<typename T >
bool VtAnyTrue (VtArray< T > const &a)
 Returns true if any element of input array is not VtZero, else false. More...
 
template<typename T >
bool VtAllTrue (VtArray< T > const &a)
 Returns true if every element of input array is not VtZero, else false. More...
 

Macro Definition Documentation

#define BOOST_PP_ITERATION_PARAMS_1
Value:
(4, \
(0, VT_FUNCTIONS_MAX_ARGS, "pxr/base/vt/functions.h", 0))

Definition at line 47 of file functions.h.

Function Documentation

bool VtAllTrue ( VtArray< T > const &  a)

Returns true if every element of input array is not VtZero, else false.

Intended to be used to evaluate results of boolean operations on arrays, e.g.

* a = Vt.StringArray((3,),("foo","bar","baz"))
* t = Vt.AllTrue(Vt.Equal(a,"bar"))
*

(This example, if you look carefully, evaluates this function not on the strings, but on the results of the comparison).

Definition at line 221 of file functions.h.

bool VtAnyTrue ( VtArray< T > const &  a)

Returns true if any element of input array is not VtZero, else false.

Intended to be used to evaluate results of boolean operations on arrays, e.g.

* a = Vt.StringArray((3,),("foo","bar","baz"))
* t = Vt.AnyTrue(Vt.Equal(a,"bar"))
*

(This example, if you look carefully, evaluates this function not on the strings, but on the results of the comparison).

Definition at line 195 of file functions.h.

VtArray<T> VtCat ( VtArray< T > const &  a0,
VtArray< T > const &  a1,
...VtArray< T > const &  aN 
)

Concatenates arrays.

The result is an array with length equal to the sum of the number of elements in the source arrays.

VtArray<T> VtEqual ( VtArray< T > const &  a,
VtArray< T > const &  b 
)

Returns a bool array specifying, element-by-element, if the two inputs contain equal values.

The shape of the return array is the same as the shape of the largest input array.

If one input is a single element (either a single-element array or a scalar of the same type held in the array), it is compared to all the elements in the other array. Otherwise both arrays must have the same shape.

VtArray<T> VtGreater ( VtArray< T > const &  a,
VtArray< T > const &  b 
)

Returns a bool array specifying, element-by-element, if the first input contains values greater than those in the second input.

The shape of the return array is the same as the shape of the largest input array.

If one input is a single element (either a single-element array or a scalar of the same type held in the array), it is compared to all the elements in the other array. Otherwise both arrays must have the same shape.

VtArray<T> VtGreaterOrEqual ( VtArray< T > const &  a,
VtArray< T > const &  b 
)

Returns a bool array specifying, element-by-element, if the first input contains values greater than or equal to those in the second input.

The shape of the return array is the same as the shape of the largest input array.

If one input is a single element (either a single-element array or a scalar of the same type held in the array), it is compared to all the elements in the other array. Otherwise both arrays must have the same shape.

VtArray<T> VtLess ( VtArray< T > const &  a,
VtArray< T > const &  b 
)

Returns a bool array specifying, element-by-element, if the first input contains values less than those in the second input.

The shape of the return array is the same as the shape of the largest input array.

If one input is a single element (either a single-element array or a scalar of the same type held in the array), it is compared to all the elements in the other array. Otherwise both arrays must have the same shape.

VtArray<T> VtLessOrEqual ( VtArray< T > const &  a,
VtArray< T > const &  b 
)

Returns a bool array specifying, element-by-element, if the first input contains values less than or equal to those in the second input.

The shape of the return array is the same as the shape of the largest input array.

If one input is a single element (either a single-element array or a scalar of the same type held in the array), it is compared to all the elements in the other array. Otherwise both arrays must have the same shape.

VtArray<T> VtNotEqual ( VtArray< T > const &  a,
VtArray< T > const &  b 
)

Returns a bool array specifying, element-by-element, if the two inputs contain inequal values.

The shape of the return array is the same as the shape of the largest input array.

If one input is a single element (either a single-element array or a scalar of the same type held in the array), it is compared to all the elements in the other array. Otherwise both arrays must have the same shape.