|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
This class handles GSL permutation objects. More...
#include <permutation.hpp>

Classes | |
| class | const_iterator_t |
| A class template for the const iterators. More... | |
| class | iterator_base |
| The container must have iterator types. More... | |
Public Types | |
| typedef const_iterator_t< false > | const_iterator |
| The const_iterator type. More... | |
| typedef const_iterator_t< true > | const_reverse_iterator |
| The const_reverse_iterator type. More... | |
| typedef const_iterator::difference_type | difference_type |
| A container must have a difference_type. More... | |
| typedef size_t | size_type |
| A container must have a size_type. More... | |
Public Member Functions | |
| permutation () | |
| The default constructor is only really useful for assigning to. More... | |
| permutation (size_t const n, bool init=false) | |
| This constructor creates a new permutation with n elements. More... | |
| permutation (gsl_permutation *v) | |
| Could construct from a gsl_permutation. More... | |
| permutation (permutation const &v) | |
| The copy constructor. More... | |
| permutation & | operator= (permutation const &v) |
| The assignment operator. More... | |
| permutation | clone () const |
| The clone function. More... | |
| ~permutation () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| permutation (permutation &&v) | |
| Move constructor. More... | |
| permutation & | operator= (permutation &&v) |
| Move operator. More... | |
| gsl_permutation * | get () |
| Get the gsl_permutation. More... | |
| gsl_permutation const * | get () const |
| Get the gsl_permutation. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_permutation. More... | |
| size_t | use_count () const |
| Find how many permutation objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| void | init () |
| C++ version of gsl_permutation_init(). More... | |
| int | memcpy (permutation const &src) |
| C++ version of gsl_permutation_memcpy(). More... | |
| int | fread (FILE *stream) |
| C++ version of gsl_permutation_fread(). More... | |
| int | fwrite (FILE *stream) const |
| C++ version of gsl_permutation_fwrite(). More... | |
| int | fscanf (FILE *stream) |
| C++ version of gsl_permutation_fscanf(). More... | |
| int | fprintf (FILE *stream, char const *format) const |
| C++ version of gsl_permutation_fprintf(). More... | |
| size_t | size () const |
| C++ version of gsl_permutation_size(). More... | |
| size_t * | data () const |
| C++ version of gsl_permutation_data(). More... | |
| int | swap (size_t const i, size_t const j) |
| C++ version of gsl_permutation_swap(). More... | |
| int | valid () const |
| C++ version of gsl_permutation_valid(). More... | |
| void | reverse () |
| C++ version of gsl_permutation_reverse(). More... | |
| int | inverse (permutation const &p) |
| C++ version of gsl_permutation_inverse(). More... | |
| int | next () |
| C++ version of gsl_permutation_next(). More... | |
| int | prev () |
| C++ version of gsl_permutation_prev(). More... | |
| int | mul (permutation const &pa, permutation const &pb) |
| C++ version of gsl_permutation_mul(). More... | |
| int | linear_to_canonical (permutation const &p) |
| C++ version of gsl_permutation_linear_to_canonical(). More... | |
| int | canonical_to_linear (permutation const &q) |
| C++ version of gsl_permutation_canonical_to_linear(). More... | |
| size_t | inversions () const |
| C++ version of gsl_permutation_inversions(). More... | |
| size_t | linear_cycles () const |
| C++ version of gsl_permutation_linear_cycles(). More... | |
| size_t | canonical_cycles () const |
| C++ version of gsl_permutation_canonical_cycles(). More... | |
| size_t | get (size_t const i) const |
| C++ version of gsl_permutation_get(). More... | |
| size_t | operator[] (size_t const i) const |
| C++ version of gsl_permutation_get(). More... | |
| const_iterator | begin () const |
| Get iterator pointing to first permutation element. More... | |
| const_iterator | end () const |
| Get iterator pointing beyond last permutation element. More... | |
Static Public Member Functions | |
| static permutation | calloc (size_t const n) |
| C++ version of gsl_permutation_calloc(). More... | |
Private Attributes | |
| gsl_permutation * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
This class handles GSL permutation objects.
Definition at line 33 of file permutation.hpp.
| typedef const_iterator_t<false> gsl::permutation::const_iterator |
The const_iterator type.
Definition at line 737 of file permutation.hpp.
| typedef const_iterator_t<true> gsl::permutation::const_reverse_iterator |
The const_reverse_iterator type.
Definition at line 741 of file permutation.hpp.
A container must have a difference_type.
Definition at line 746 of file permutation.hpp.
| typedef size_t gsl::permutation::size_type |
A container must have a size_type.
Definition at line 751 of file permutation.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 38 of file permutation.hpp.
References ccgsl_pointer, and count.
Referenced by calloc().
|
inlineexplicit |
This constructor creates a new permutation with n elements.
| n | The number of elements in the permutation |
| init | Set to true to have the permutation initialised |
Definition at line 47 of file permutation.hpp.
References ccgsl_pointer, count, init(), and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_permutation.
This is not usually a good idea. In this case you should not use gsl_permutation_free() to deallocate the memory.
| v | The permutation |
Definition at line 63 of file permutation.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This shares the permutation. Use clone() if you want a full copy.
| v | The permutation to copy. |
Definition at line 74 of file permutation.hpp.
References count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 111 of file permutation.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The permutation to move. |
Definition at line 123 of file permutation.hpp.
References count.
|
inline |
Get iterator pointing to first permutation element.
Definition at line 757 of file permutation.hpp.
|
inlinestatic |
C++ version of gsl_permutation_calloc().
| n | The size of the permutation |
Definition at line 186 of file permutation.hpp.
References gsl::rstat::n(), and permutation().
|
inline |
C++ version of gsl_permutation_canonical_cycles().
Definition at line 302 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_canonical_to_linear().
| q | Apermutation |
Definition at line 286 of file permutation.hpp.
References get().
|
inline |
The clone function.
Use this if you want a copy of the permutation that does not share the underlying data.
Definition at line 100 of file permutation.hpp.
|
inline |
C++ version of gsl_permutation_data().
Definition at line 232 of file permutation.hpp.
References get().
|
inline |
Get iterator pointing beyond last permutation element.
Definition at line 765 of file permutation.hpp.
References ccgsl_pointer, and size().
|
inline |
C++ version of gsl_permutation_fprintf().
| stream | An output stream |
| format | A print format: typically "%zu\n" |
Definition at line 221 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_fread().
| stream | An output stream |
Definition at line 202 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_fscanf().
| stream | An output stream |
Definition at line 214 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_fwrite().
| stream | An output stream |
Definition at line 208 of file permutation.hpp.
References get().
|
inline |
Get the gsl_permutation.
Definition at line 153 of file permutation.hpp.
References ccgsl_pointer.
Referenced by canonical_cycles(), canonical_to_linear(), clone(), gsl::linalg::COD_decomp(), gsl::linalg::COD_decomp_e(), gsl::linalg::COD_lssolve(), gsl::linalg::COD_lssolve2(), gsl::permute::complex_float_forward(), gsl::permute::complex_float_inverse(), gsl::permute::complex_forward(), gsl::permute::complex_inverse(), gsl::permute::complex_long_double_forward(), gsl::permute::complex_long_double_inverse(), gsl::linalg::complex_LU_decomp(), gsl::linalg::complex_LU_invert(), gsl::linalg::complex_LU_invx(), gsl::linalg::complex_LU_refine(), gsl::linalg::complex_LU_solve(), gsl::linalg::complex_LU_svx(), data(), gsl::permute::float_forward(), gsl::permute::float_inverse(), gsl::permute::forward(), fprintf(), fread(), fscanf(), fwrite(), init(), gsl::permute::int_forward(), gsl::permute::int_inverse(), inverse(), gsl::permute::inverse(), inversions(), linear_cycles(), linear_to_canonical(), gsl::permute::long_double_forward(), gsl::permute::long_double_inverse(), gsl::permute::long_forward(), gsl::permute::long_inverse(), gsl::linalg::LU_decomp(), gsl::linalg::LU_invert(), gsl::linalg::LU_invx(), gsl::linalg::LU_refine(), gsl::linalg::LU_solve(), gsl::linalg::LU_svx(), gsl::linalg::mcholesky_decomp(), gsl::linalg::mcholesky_invert(), gsl::linalg::mcholesky_rcond(), gsl::linalg::mcholesky_solve(), gsl::linalg::mcholesky_svx(), memcpy(), mul(), next(), operator[](), gsl::linalg::pcholesky_decomp(), gsl::linalg::pcholesky_decomp2(), gsl::linalg::pcholesky_invert(), gsl::linalg::pcholesky_rcond(), gsl::linalg::pcholesky_solve(), gsl::linalg::pcholesky_solve2(), gsl::linalg::pcholesky_svx(), gsl::linalg::pcholesky_svx2(), gsl::matrix::permute(), gsl::matrix_char::permute(), gsl::matrix_complex::permute(), gsl::matrix_complex_float::permute(), gsl::matrix_complex_long_double::permute(), gsl::matrix_float::permute(), gsl::matrix_int::permute(), gsl::matrix_long::permute(), gsl::matrix_long_double::permute(), gsl::matrix_short::permute(), gsl::matrix_uchar::permute(), gsl::matrix_uint::permute(), gsl::matrix_ulong::permute(), gsl::matrix_ushort::permute(), prev(), gsl::linalg::PTLQ_decomp(), gsl::linalg::PTLQ_decomp2(), gsl::linalg::PTLQ_LQsolve_T(), gsl::linalg::PTLQ_Lsolve_T(), gsl::linalg::PTLQ_Lsvx_T(), gsl::linalg::PTLQ_solve_T(), gsl::linalg::PTLQ_svx_T(), gsl::linalg::PTLQ_update(), gsl::linalg::QRPT_decomp(), gsl::linalg::QRPT_decomp2(), gsl::linalg::QRPT_lssolve(), gsl::linalg::QRPT_lssolve2(), gsl::linalg::QRPT_QRsolve(), gsl::linalg::QRPT_Rsolve(), gsl::linalg::QRPT_Rsvx(), gsl::linalg::QRPT_solve(), gsl::linalg::QRPT_svx(), gsl::linalg::QRPT_update(), reverse(), gsl::permute::short_forward(), gsl::permute::short_inverse(), size(), swap(), gsl::permute::uchar_forward(), gsl::permute::uchar_inverse(), gsl::permute::uint_forward(), gsl::permute::uint_inverse(), gsl::permute::ulong_forward(), gsl::permute::ulong_inverse(), gsl::permute::ushort_forward(), gsl::permute::ushort_inverse(), valid(), gsl::permute::vector_char_forward(), gsl::permute::vector_char_inverse(), gsl::permute::vector_complex_float_forward(), gsl::permute::vector_complex_float_inverse(), gsl::permute::vector_complex_forward(), gsl::permute::vector_complex_inverse(), gsl::permute::vector_complex_long_double_forward(), gsl::permute::vector_complex_long_double_inverse(), gsl::permute::vector_float_forward(), gsl::permute::vector_float_inverse(), gsl::permute::vector_forward(), gsl::permute::vector_int_forward(), gsl::permute::vector_int_inverse(), gsl::permute::vector_inverse(), gsl::permute::vector_long_double_forward(), gsl::permute::vector_long_double_inverse(), gsl::permute::vector_long_forward(), gsl::permute::vector_long_inverse(), gsl::permute::vector_short_forward(), gsl::permute::vector_short_inverse(), gsl::permute::vector_uchar_forward(), gsl::permute::vector_uchar_inverse(), gsl::permute::vector_uint_forward(), gsl::permute::vector_uint_inverse(), gsl::permute::vector_ulong_forward(), gsl::permute::vector_ulong_inverse(), gsl::permute::vector_ushort_forward(), and gsl::permute::vector_ushort_inverse().
|
inline |
Get the gsl_permutation.
Definition at line 158 of file permutation.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_permutation_get().
| i | index of element |
i Definition at line 308 of file permutation.hpp.
References get().
Referenced by get().
|
inline |
C++ version of gsl_permutation_init().
Definition at line 190 of file permutation.hpp.
References get().
Referenced by permutation().
|
inline |
C++ version of gsl_permutation_inverse().
| p | Another permutation |
Definition at line 254 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_inversions().
Definition at line 292 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_linear_cycles().
Definition at line 297 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_linear_to_canonical().
| p | A permutation |
Definition at line 279 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_memcpy().
| src | The permutation to copy |
Definition at line 196 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_mul().
| pa | The first permutation |
| pb | The second permutation (applied after pb) |
Definition at line 271 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_next().
Definition at line 259 of file permutation.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_permutation Definition at line 178 of file permutation.hpp.
References ccgsl_pointer.
|
inline |
Move operator.
| v | The permutation to move. |
Definition at line 132 of file permutation.hpp.
References ccgsl_pointer, and count.
|
inline |
The assignment operator.
This makes a shared copy.
| v | The permutation to copy |
Definition at line 82 of file permutation.hpp.
References ccgsl_pointer, and count.
|
inline |
C++ version of gsl_permutation_get().
| i | index of element |
i Definition at line 314 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_prev().
Definition at line 264 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_reverse().
Definition at line 248 of file permutation.hpp.
References get().
Referenced by gsl::permutation::iterator_base< container, content, reverse >::decrement(), gsl::permutation::iterator_base< container, content, reverse >::increment(), gsl::permutation::iterator_base< container, content, reverse >::operator-(), gsl::permutation::const_iterator_t< reverse >::operator<(), gsl::permutation::iterator_base< container, content, reverse >::operator<(), gsl::permutation::iterator_base< container, content, reverse >::operator[](), and gsl::permutation::iterator_base< container, content, reverse >::shift().
|
inline |
C++ version of gsl_permutation_size().
Definition at line 227 of file permutation.hpp.
References get().
|
inline |
C++ version of gsl_permutation_swap().
| i | An element |
| j | An element to swap with i |
Definition at line 239 of file permutation.hpp.
References get().
|
inline |
Find if this is the only object sharing the gsl_permutation.
true or falses according as this is the only permutation object sharing the gsl_permutation Definition at line 164 of file permutation.hpp.
References count.
|
inline |
Find how many permutation objects share this pointer.
Definition at line 169 of file permutation.hpp.
References count.
|
inline |
C++ version of gsl_permutation_valid().
Definition at line 244 of file permutation.hpp.
References get().
|
private |
The shared pointer.
Definition at line 142 of file permutation.hpp.
Referenced by end(), get(), operator bool(), gsl::permutation::const_iterator_t< reverse >::operator<(), operator=(), permutation(), and ~permutation().
|
private |
The shared reference count.
Definition at line 146 of file permutation.hpp.
Referenced by operator=(), permutation(), unique(), use_count(), and ~permutation().