Array
Class for passing arrays to Xpress library functions. More...

Public Types |
|
typedef T | value_type |
The type of data in this array. |
|
Public Member Functions |
|
Array () | |
Create a null array. |
|
Array (Array< typename std::remove_const< T >::type > const &a) | |
Copy constructor. |
|
template<std::size_t N> | |
Array (std::array< T, N > &d) | |
Create a new array descriptor from a std::array . |
|
template<std::size_t N> | |
Array (std::array< typename std::remove_const< T >::type, N > const &d) | |
Create a new array descriptor from a std::array . |
|
Array (std::nullptr_t) | |
Create an array from a null pointer. |
|
Array (std::vector< T > &d) | |
Create a new array descriptor from a std::vector . |
|
Array (std::vector< typename std::remove_const< T >::type > const &d) | |
Create a new array descriptor from a std::vector . |
|
Array (T *d) | |
Create a new array descriptor from a C style array. |
|
operator bool () const | |
Conversion to boolean. |
|
operator value_type * () const | |
Dereference operator. |
|
bool | operator!= (std::nullptr_t) const |
Nullity check. |
|
bool | operator== (std::nullptr_t) const |
Nullity check. |
|
template<typename I > | |
value_type & | operator[] (I i) const |
Index into wrapped data. |
|
Public Attributes |
|
value_type * | data |
The underlying C style array. |
|
Detailed Description
class xpress::Array< T >
Class for passing arrays to Xpress library functions.
All arrays passed to the Xpress library are passed as instances of this class. Using this class allows passing arrays as plain C arrays, as instances of std::array
or std::vector
.
Note that for std::array
and std::vector
the constructor extracts a pointer to the underlying raw data storage. So this storage must stay alive for the lifetime of the Array instance, otherwise undefined behavior will occur.
You should not have to deal with this class explicitly. It only exists to simplify argument passing to Xpress functions. It provides flexibility without creating a large amount of overloads.
- Since
- 44.00
Member Typedef Documentation
value_type
T xpress::Array< T >::value_type |
The type of data in this array.
- Since
- 44.00
Constructor & Destructor Documentation
Array() [1/8]
|
inline |
Create a new array descriptor from a C style array.
- Parameters
-
d The C style array.
- Since
- 44.00
Array() [2/8]
|
inline |
Create a new array descriptor from a std::vector
.
- Parameters
-
d The vector.
- Since
- 44.00
Array() [3/8]
|
inline |
Create a new array descriptor from a std::vector
.
- Parameters
-
d The vector.
- Since
- 44.00
Array() [4/8]
|
inline |
Create a new array descriptor from a std::array
.
- Parameters
-
d The array.
- Since
- 44.00
Array() [5/8]
|
inline |
Create a new array descriptor from a std::array
.
- Parameters
-
d The array.
- Since
- 44.00
Array() [6/8]
|
inline |
Copy constructor.
- Parameters
-
a The array to copy.
- Since
- 44.00
Array() [7/8]
|
inline |
Create an array from a null
pointer.
- Since
- 44.00
Array() [8/8]
|
inline |
Create a null
array.
- Since
- 44.00
Member Function Documentation
operator bool()
|
inlineexplicit |
Conversion to boolean.
- Returns
-
false
if this instance wraps a null pointer,true
otherwise.
- Since
- 44.00
operator value_type *()
|
inline |
Dereference operator.
- Returns
- The wrapped pointer.
- Since
- 44.00
operator!=()
|
inline |
Nullity check.
- Returns
-
false
if this instance wraps a null pointer,true
otherwise.
- Since
- 44.00
operator==()
|
inline |
Nullity check.
- Returns
-
true
if this instance wraps a null pointer,false
otherwise.
- Since
- 44.00
operator[]()
|
inline |
Index into wrapped data.
- Parameters
-
i Index to query.
- Template Parameters
-
I Index type.
- Returns
-
The element at position
i
.
- Since
- 44.00
Member Data Documentation
data
value_type* xpress::Array< T >::data |
The underlying C style array.
- Since
- 44.00
The documentation for this class was generated from the following file:
- xpress.hpp
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.