Rosetta
2019.07
|
CArrayP: Memory-Managed C Array Wrapper Supporting Proxies. More...
#include <CArrayP.hh>
Public Types | |
typedef T | value_type |
typedef T & | reference |
typedef T const & | const_reference |
typedef T * | pointer |
typedef T const * | const_pointer |
typedef T * | iterator |
typedef T const * | const_iterator |
typedef std::size_t | size_type |
typedef std::ptrdiff_t | difference_type |
typedef T | Value |
typedef T & | Reference |
typedef T const & | ConstReference |
typedef T * | Pointer |
typedef T const * | ConstPointer |
typedef T * | Iterator |
typedef T const * | ConstIterator |
typedef std::size_t | Size |
typedef std::ptrdiff_t | Difference |
typedef void | iterator_category |
Public Member Functions | |
CArrayP () | |
Default constructor. More... | |
CArrayP (CArrayP const &a) | |
Copy constructor. More... | |
CArrayP (CArrayP &a) | |
Non-Const Copy constructor. More... | |
template<typename U > | |
CArrayP (CArrayP< U > const &a) | |
Copy constructor template. More... | |
CArrayP (T const *const p, size_type const size_a) | |
Pointer + size constructor. More... | |
template<typename U > | |
CArrayP (U const *const p, size_type const size_a) | |
Pointer + size constructor template. More... | |
template<typename InputIterator > | |
CArrayP (InputIterator const beg, InputIterator const end) | |
Iterator range constructor template. More... | |
CArrayP (size_type const size_a) | |
Size constructor. More... | |
CArrayP (size_type const size_a, T const &t) | |
Size + uniform value constructor. More... | |
~CArrayP () | |
Destructor. More... | |
operator bool () const | |
Active? More... | |
CArrayP & | operator= (CArrayP const &a) |
Copy assignment. More... | |
template<typename U > | |
CArrayP & | operator= (CArrayP< U > const &a) |
Copy assignment template. More... | |
CArrayP & | operator= (T const &t) |
Uniform value assignment. More... | |
CArrayP & | assign (T const *const p, size_type const size_a) |
Pointer + size assignment. More... | |
template<typename U > | |
CArrayP & | assign (U const *const p, size_type const size_a) |
Pointer + size assignment template. More... | |
template<typename InputIterator > | |
CArrayP & | assign (InputIterator const beg, InputIterator const end) |
Iterator range assignment template. More... | |
CArrayP & | assign (size_type const size_a, T const &value) |
Size + value assignment. More... | |
template<typename U > | |
CArrayP & | operator+= (CArrayP< U > const &a) |
+= CArrayP More... | |
template<typename U > | |
CArrayP & | operator-= (CArrayP< U > const &a) |
-= CArrayP More... | |
CArrayP & | operator+= (T const &t) |
+= value More... | |
CArrayP & | operator-= (T const &t) |
-= value More... | |
CArrayP & | operator*= (T const &t) |
*= value More... | |
CArrayP & | operator/= (T const &t) |
/= value More... | |
bool | active () const |
Active? More... | |
bool | empty () const |
Empty? More... | |
bool | owner () const |
Owner? More... | |
bool | proxy () const |
Proxy? More... | |
size_type | size () const |
Size. More... | |
size_type | l () const |
Lower index. More... | |
size_type | u () const |
Upper index. More... | |
T const & | front () const |
First element. More... | |
T const & | back () const |
Last element. More... | |
T | length () const |
Length. More... | |
T | length_squared () const |
Length squared. More... | |
T & | front () |
First element. More... | |
T & | back () |
Last element. More... | |
CArrayP & | size (size_type const size_a) |
Resize: Values not preserved. More... | |
CArrayP & | resize (size_type const size_a, T const &fill=T()) |
Resize to size with fill value: Values preserved. More... | |
void | swap (CArrayP &a) |
Swap. More... | |
CArrayP & | clear () |
Clear. More... | |
CArrayP & | normalize () |
Normalize to unit length. More... | |
CArrayP & | attach (CArrayP const &a) |
Attach as proxy to a const CArrayP. More... | |
CArrayP & | attach (CArrayP &a) |
Attach as proxy to a CArrayP. More... | |
CArrayP & | detach () |
Detach as proxy to a CArrayP. More... | |
T const & | operator[] (size_type const i) const |
CArrayP[ i ] const: 0-based indexing. More... | |
T & | operator[] (size_type const i) |
CArrayP[ i ]: 0-based indexing. More... | |
const_iterator | begin () const |
const_iterator to beginning of array More... | |
iterator | begin () |
iterator to beginning of array More... | |
const_iterator | end () const |
const_iterator to element past end of array More... | |
iterator | end () |
iterator to element past end of array More... | |
T const & | operator() () const |
C array const accessor. More... | |
T & | operator() () |
C array non-const accessor. More... | |
Static Public Member Functions | |
static CArrayP | Proxy (CArrayP const &a) |
Proxy const copy named constructor. More... | |
static CArrayP | Proxy (CArrayP &a) |
Proxy copy named constructor. More... | |
static CArrayP | Proxy (CArrayP const &a, size_type const size_a) |
Proxy const copy + size named constructor. More... | |
static CArrayP | Proxy (CArrayP &a, size_type const size_a) |
Proxy copy + size named constructor. More... | |
Static Private Member Functions | |
static T | square (T const &x) |
square( x ) == x^2 More... | |
Private Attributes | |
size_type | size_ |
Number of array elements. More... | |
T * | array_ |
C array. More... | |
bool | owner_ |
Owner of the data array or proxy? More... | |
CArrayP: Memory-Managed C Array Wrapper Supporting Proxies.
typedef T const* ObjexxFCL::CArrayP< typename >::const_iterator |
typedef T const* ObjexxFCL::CArrayP< typename >::const_pointer |
typedef T const& ObjexxFCL::CArrayP< typename >::const_reference |
typedef T const* ObjexxFCL::CArrayP< typename >::ConstIterator |
typedef T const* ObjexxFCL::CArrayP< typename >::ConstPointer |
typedef T const& ObjexxFCL::CArrayP< typename >::ConstReference |
typedef std::ptrdiff_t ObjexxFCL::CArrayP< typename >::Difference |
typedef std::ptrdiff_t ObjexxFCL::CArrayP< typename >::difference_type |
typedef T* ObjexxFCL::CArrayP< typename >::iterator |
typedef T* ObjexxFCL::CArrayP< typename >::Iterator |
typedef void ObjexxFCL::CArrayP< typename >::iterator_category |
typedef T* ObjexxFCL::CArrayP< typename >::pointer |
typedef T* ObjexxFCL::CArrayP< typename >::Pointer |
typedef T& ObjexxFCL::CArrayP< typename >::reference |
typedef T& ObjexxFCL::CArrayP< typename >::Reference |
typedef std::size_t ObjexxFCL::CArrayP< typename >::Size |
typedef std::size_t ObjexxFCL::CArrayP< typename >::size_type |
typedef T ObjexxFCL::CArrayP< typename >::Value |
typedef T ObjexxFCL::CArrayP< typename >::value_type |
|
inline |
Default constructor.
Referenced by ObjexxFCL::CArrayP< typename >::assign(), and ObjexxFCL::CArrayP< typename >::size().
|
inline |
Copy constructor.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Non-Const Copy constructor.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Copy constructor template.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::size_, and test.T007_TracerIO::T.
|
inline |
Pointer + size constructor.
References ObjexxFCL::CArrayP< typename >::array_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Pointer + size constructor template.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::size_, and test.T007_TracerIO::T.
|
inline |
Iterator range constructor template.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::size_, and test.T007_TracerIO::T.
|
inlineexplicit |
Size constructor.
|
inline |
Size + uniform value constructor.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::size_, and basic::options::OptionKeys::in::file::t.
|
inline |
Destructor.
References ObjexxFCL::CArrayP< typename >::array_, and ObjexxFCL::CArrayP< typename >::owner_.
|
inline |
Active?
References ObjexxFCL::CArrayP< typename >::array_.
|
inline |
Pointer + size assignment.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, proxy_const_assert, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Pointer + size assignment template.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, proxy_const_assert, ObjexxFCL::CArrayP< typename >::size_, and test.T007_TracerIO::T.
|
inline |
Iterator range assignment template.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, proxy_const_assert, ObjexxFCL::CArrayP< typename >::size_, and test.T007_TracerIO::T.
|
inline |
Size + value assignment.
References ObjexxFCL::CArrayP< typename >::CArrayP(), ObjexxFCL::CArrayP< typename >::owner_, proxy_const_assert, ObjexxFCL::CArrayP< typename >::size_, and value.
|
inline |
Attach as proxy to a const CArrayP.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Attach as proxy to a CArrayP.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Last element.
References ObjexxFCL::CArrayP< typename >::array_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Last element.
References ObjexxFCL::CArrayP< typename >::array_, proxy_const_assert, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
const_iterator to beginning of array
References ObjexxFCL::CArrayP< typename >::array_.
|
inline |
iterator to beginning of array
References ObjexxFCL::CArrayP< typename >::array_, and proxy_const_assert.
|
inline |
|
inline |
Detach as proxy to a CArrayP.
References ObjexxFCL::CArrayP< typename >::clear(), and ObjexxFCL::CArrayP< typename >::owner_.
|
inline |
Empty?
References ObjexxFCL::CArrayP< typename >::size_.
|
inline |
const_iterator to element past end of array
References ObjexxFCL::CArrayP< typename >::array_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
iterator to element past end of array
References ObjexxFCL::CArrayP< typename >::array_, proxy_const_assert, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
First element.
References ObjexxFCL::CArrayP< typename >::array_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
First element.
References ObjexxFCL::CArrayP< typename >::array_, proxy_const_assert, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Lower index.
References ObjexxFCL::CArrayP< typename >::u().
|
inline |
Length.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::size_, ObjexxFCL::CArrayP< typename >::square(), and test.T007_TracerIO::T.
Referenced by ObjexxFCL::CArrayP< typename >::normalize().
|
inline |
Length squared.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::size_, ObjexxFCL::CArrayP< typename >::square(), and test.T007_TracerIO::T.
|
inline |
Normalize to unit length.
References ObjexxFCL::CArrayP< typename >::length(), ObjexxFCL::CArrayP< typename >::operator/=(), and test.T007_TracerIO::T.
|
inline |
Active?
References ObjexxFCL::CArrayP< typename >::array_.
|
inline |
C array const accessor.
References ObjexxFCL::CArrayP< typename >::array_.
|
inline |
C array non-const accessor.
References ObjexxFCL::CArrayP< typename >::array_, and proxy_const_assert.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
/= value
References ObjexxFCL::CArrayP< typename >::array_, proxy_const_assert, ObjexxFCL::CArrayP< typename >::size_, test.T007_TracerIO::T, and basic::options::OptionKeys::in::file::t.
Referenced by ObjexxFCL::CArrayP< typename >::normalize().
|
inline |
Copy assignment.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, proxy_const_assert, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Copy assignment template.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, proxy_const_assert, ObjexxFCL::CArrayP< typename >::size_, and test.T007_TracerIO::T.
|
inline |
Uniform value assignment.
References ObjexxFCL::CArrayP< typename >::array_, proxy_const_assert, ObjexxFCL::CArrayP< typename >::size_, and basic::options::OptionKeys::in::file::t.
|
inline |
CArrayP[ i ] const: 0-based indexing.
References ObjexxFCL::CArrayP< typename >::array_, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
CArrayP[ i ]: 0-based indexing.
References ObjexxFCL::CArrayP< typename >::array_, proxy_const_assert, and ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Owner?
References ObjexxFCL::CArrayP< typename >::owner_.
|
inlinestatic |
Proxy const copy named constructor.
References basic::options::OptionKeys::score::fiber_diffraction::p.
|
inlinestatic |
Proxy copy named constructor.
References basic::options::OptionKeys::score::fiber_diffraction::p.
|
inlinestatic |
Proxy const copy + size named constructor.
References basic::options::OptionKeys::score::fiber_diffraction::p.
|
inlinestatic |
Proxy copy + size named constructor.
References basic::options::OptionKeys::score::fiber_diffraction::p.
|
inline |
Proxy?
References ObjexxFCL::CArrayP< typename >::owner_.
|
inline |
Resize to size with fill value: Values preserved.
References basic::options::OptionKeys::score::fiber_diffraction::a, ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, ObjexxFCL::CArrayP< typename >::size_, and ObjexxFCL::CArrayP< typename >::swap().
|
inline |
Size.
References ObjexxFCL::CArrayP< typename >::size_.
|
inline |
Resize: Values not preserved.
References ObjexxFCL::CArrayP< typename >::CArrayP(), ObjexxFCL::CArrayP< typename >::owner_, and ObjexxFCL::CArrayP< typename >::size_.
|
inlinestaticprivate |
square( x ) == x^2
References numeric::crick_equations::x().
Referenced by ObjexxFCL::CArrayP< typename >::length(), and ObjexxFCL::CArrayP< typename >::length_squared().
|
inline |
Swap.
References ObjexxFCL::CArrayP< typename >::array_, ObjexxFCL::CArrayP< typename >::owner_, ObjexxFCL::CArrayP< typename >::size_, and swap().
Referenced by ObjexxFCL::CArrayP< typename >::resize(), and ObjexxFCL::swap().
|
inline |
Upper index.
References ObjexxFCL::CArrayP< typename >::size_.
Referenced by ObjexxFCL::CArrayP< typename >::l().
|
friend |
Are two CArrayPs comparable?
|
friend |
Distance.
|
friend |
Distance squared.
Dot product.
|
friend |
Dot product.
CArrayP * Value.
Value * CArrayP.
CArrayP + Value.
Value + CArrayP.
CArrayP - Value.
Value - CArrayP.
CArrayP / Value.
|
private |
C array.
Referenced by ObjexxFCL::CArrayP< typename >::active(), ObjexxFCL::CArrayP< typename >::assign(), ObjexxFCL::CArrayP< typename >::attach(), ObjexxFCL::CArrayP< typename >::back(), ObjexxFCL::CArrayP< typename >::begin(), ObjexxFCL::CArrayP< typename >::CArrayP(), ObjexxFCL::CArrayP< typename >::clear(), ObjexxFCL::CArrayP< typename >::end(), ObjexxFCL::CArrayP< typename >::front(), ObjexxFCL::CArrayP< typename >::length(), ObjexxFCL::CArrayP< typename >::length_squared(), ObjexxFCL::CArrayP< typename >::operator bool(), ObjexxFCL::CArrayP< typename >::operator()(), ObjexxFCL::CArrayP< typename >::operator*=(), ObjexxFCL::CArrayP< typename >::operator+=(), ObjexxFCL::CArrayP< typename >::operator-=(), ObjexxFCL::CArrayP< typename >::operator/=(), ObjexxFCL::CArrayP< typename >::operator=(), ObjexxFCL::CArrayP< typename >::operator[](), ObjexxFCL::CArrayP< typename >::resize(), ObjexxFCL::CArrayP< typename >::swap(), and ObjexxFCL::CArrayP< typename >::~CArrayP().
|
private |
Owner of the data array or proxy?
Referenced by ObjexxFCL::CArrayP< typename >::assign(), ObjexxFCL::CArrayP< typename >::attach(), ObjexxFCL::CArrayP< typename >::CArrayP(), ObjexxFCL::CArrayP< typename >::clear(), ObjexxFCL::CArrayP< typename >::detach(), ObjexxFCL::CArrayP< typename >::operator=(), ObjexxFCL::CArrayP< typename >::owner(), ObjexxFCL::CArrayP< typename >::proxy(), ObjexxFCL::CArrayP< typename >::resize(), ObjexxFCL::CArrayP< typename >::size(), ObjexxFCL::CArrayP< typename >::swap(), and ObjexxFCL::CArrayP< typename >::~CArrayP().
|
private |
Number of array elements.
Referenced by ObjexxFCL::CArrayP< typename >::assign(), ObjexxFCL::CArrayP< typename >::attach(), ObjexxFCL::CArrayP< typename >::back(), ObjexxFCL::CArrayP< typename >::CArrayP(), ObjexxFCL::CArrayP< typename >::clear(), ObjexxFCL::CArrayP< typename >::empty(), ObjexxFCL::CArrayP< typename >::end(), ObjexxFCL::CArrayP< typename >::front(), ObjexxFCL::CArrayP< typename >::length(), ObjexxFCL::CArrayP< typename >::length_squared(), ObjexxFCL::CArrayP< typename >::operator*=(), ObjexxFCL::CArrayP< typename >::operator+=(), ObjexxFCL::CArrayP< typename >::operator-=(), ObjexxFCL::CArrayP< typename >::operator/=(), ObjexxFCL::CArrayP< typename >::operator=(), ObjexxFCL::CArrayP< typename >::operator[](), ObjexxFCL::CArrayP< typename >::resize(), ObjexxFCL::CArrayP< typename >::size(), ObjexxFCL::CArrayP< typename >::swap(), and ObjexxFCL::CArrayP< typename >::u().