Initializing help system before first use

Array

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

Inheritance diagram for xpress::Array< T >:
xpress::SizedArray< T >

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

template<typename T>
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

template<typename T >
T xpress::Array< T >::value_type

The type of data in this array.

Since
44.00

Constructor & Destructor Documentation

Array() [1/8]

template<typename T >
xpress::Array< T >::Array ( T * d )
inline

Create a new array descriptor from a C style array.

Parameters
d The C style array.
Since
44.00

Array() [2/8]

template<typename T >
xpress::Array< T >::Array ( std::vector< T > & d )
inline

Create a new array descriptor from a std::vector.

Parameters
d The vector.
Since
44.00

Array() [3/8]

template<typename T >
xpress::Array< T >::Array ( std::vector< typename std::remove_const< T >::type > const & d )
inline

Create a new array descriptor from a std::vector.

Parameters
d The vector.
Since
44.00

Array() [4/8]

template<typename T >
template<std::size_t N>
xpress::Array< T >::Array ( std::array< T, N > & d )
inline

Create a new array descriptor from a std::array.

Parameters
d The array.
Since
44.00

Array() [5/8]

template<typename T >
template<std::size_t N>
xpress::Array< T >::Array ( std::array< typename std::remove_const< T >::type, N > const & d )
inline

Create a new array descriptor from a std::array.

Parameters
d The array.
Since
44.00

Array() [6/8]

template<typename T >
xpress::Array< T >::Array ( Array< typename std::remove_const< T >::type > const & a )
inline

Copy constructor.

Parameters
a The array to copy.
Since
44.00

Array() [7/8]

template<typename T >
xpress::Array< T >::Array ( std::nullptr_t )
inline

Create an array from a null pointer.

Since
44.00

Array() [8/8]

template<typename T >
xpress::Array< T >::Array ( )
inline

Create a null array.

Since
44.00

Member Function Documentation

operator bool()

template<typename T >
xpress::Array< T >::operator bool ( ) const
inlineexplicit

Conversion to boolean.

Returns
false if this instance wraps a null pointer, true otherwise.
Since
44.00

operator value_type *()

template<typename T >
xpress::Array< T >::operator value_type * ( ) const
inline

Dereference operator.

Returns
The wrapped pointer.
Since
44.00

operator!=()

template<typename T >
bool xpress::Array< T >::operator!= ( std::nullptr_t ) const
inline

Nullity check.

Returns
false if this instance wraps a null pointer, true otherwise.
Since
44.00

operator==()

template<typename T >
bool xpress::Array< T >::operator== ( std::nullptr_t ) const
inline

Nullity check.

Returns
true if this instance wraps a null pointer, false otherwise.
Since
44.00

operator[]()

template<typename T >
template<typename I >
value_type & xpress::Array< T >::operator[] ( I i ) const
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

template<typename T >
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.