CASM  1.1.0
A Clusters Approach to Statistical Mechanics

Detailed Description

Basic std::vector like container (deprecated)

Classes

class  CASM::Array< T >
 Basic std::vector like container (deprecated) More...
 
class  CASM::ReturnArray< T >
 
class  CASM::ArraySizeLessThan
 

Functions

template<class T >
Array< T > CASM::array_cat (const Array< T > &A1, const Array< T > &A2)
 
template<class T >
std::ostream & CASM::operator<< (std::ostream &out, const Array< T > &array_out)
 
template<typename T >
void CASM::swap (Array< T > &A1, Array< T > &A2)
 
 CASM::Array< T >::Array (ReturnArray< T > &RHS)
 
static ReturnArray< T > CASM::Array< T >::sequence (const T &initial, const T &final)
 
static ReturnArray< T > CASM::Array< T >::sequence (const T &initial, const T &increment, const T &final)
 
ArrayCASM::Array< T >::operator= (const Array &RHS)
 
ArrayCASM::Array< T >::operator= (ReturnArray< T > &RHS)
 
void CASM::Array< T >::swap (Array< T > &RHS)
 
void CASM::Array< T >::resize (Index new_N)
 
void CASM::Array< T >::resize (Index new_N, const T &fill_val)
 
void CASM::Array< T >::reserve (Index new_max)
 
void CASM::Array< T >::push_back (const T &toPush)
 
void CASM::Array< T >::remove (Index ind)
 
bool CASM::Array< T >::operator== (const Array< T > &RHS) const
 
bool CASM::Array< T >::operator< (const Array< T > &RHS) const
 
bool CASM::Array< T >::operator> (const Array< T > &RHS) const
 
const T & CASM::Array< T >::max () const
 
const T & CASM::Array< T >::min () const
 
CASM::Array< T >::sum () const
 
ReturnArray< T > CASM::Array< T >::sub_array (Index ind_begin, Index ind_end) const
 
bool CASM::Array< T >::all_in (const Array &superset) const
 
Index CASM::Array< T >::coincidence (const Array &superset) const
 
Index CASM::Array< T >::incidences (const T &test_elem) const
 
Index CASM::Array< T >::find (const T &test_elem) const
 
Index CASM::Array< T >::reverse_find (const T &test_elem) const
 Same as find, but starts from the last element of the Array. More...
 
Index CASM::Array< T >::almost_find (const T &test_elem, double tol_val=TOL) const
 
void CASM::Array< T >::print_column (std::ostream &stream, const std::string &indent="") const
 
Index CASM::Array< T >::almost_reverse_find (const T &test_elem, double tol_val=TOL) const
 Same as almost_find, but start from the last element of the Array. More...
 
template<typename CompareType >
void CASM::Array< T >::sort (const CompareType &comp)
 
void CASM::Array< T >::sort (Array< Index > &ind_order)
 
void CASM::Array< T >::sort ()
 
ArrayCASM::Array< T >::append (const Array &new_tail)
 
ArrayCASM::Array< T >::append_unique (const Array &new_tail)
 
ArrayCASM::Array< T >::permute (const Array< Index > &perm_array)
 
ArrayCASM::Array< T >::ipermute (const Array< Index > &perm_array)
 
bool CASM::Array< T >::next_permute ()
 
ReturnArray< IndexCASM::Array< T >::as_perm_inverse () const
 
ReturnArray< IndexCASM::Array< T >::as_perm_transform_by (const Array< Index > &trans_perm) const
 
bool CASM::Array< T >::is_ascending () const
 
bool CASM::Array< T >::is_descending () const
 
bool CASM::Array< T >::is_constant () const
 
bool CASM::Array< T >::is_permute () const
 
bool CASM::Array< T >::has_fixed_points () const
 

Function Documentation

◆ all_in()

template<typename T >
bool CASM::Array< T >::all_in ( const Array< T > &  superset) const

Definition at line 575 of file Array.hh.

◆ almost_find()

template<typename T >
Index CASM::Array< T >::almost_find ( const T &  test_elem,
double  tol_val = TOL 
) const

Definition at line 644 of file Array.hh.

◆ almost_reverse_find()

template<typename T >
Index CASM::Array< T >::almost_reverse_find ( const T &  test_elem,
double  tol_val = TOL 
) const

Same as almost_find, but start from the last element of the Array.

Definition at line 663 of file Array.hh.

◆ append()

template<typename T >
Array< T > & CASM::Array< T >::append ( const Array< T > &  new_tail)

Definition at line 808 of file Array.hh.

◆ append_unique()

template<typename T >
Array< T > & CASM::Array< T >::append_unique ( const Array< T > &  new_tail)

Definition at line 818 of file Array.hh.

◆ Array()

template<typename T >
CASM::Array< T >::Array ( ReturnArray< T > &  RHS)

Definition at line 267 of file Array.hh.

◆ array_cat()

template<class T >
Array<T> CASM::array_cat ( const Array< T > &  A1,
const Array< T > &  A2 
)

Definition at line 974 of file Array.hh.

◆ as_perm_inverse()

template<typename T >
ReturnArray< Index > CASM::Array< T >::as_perm_inverse

Construct permutation that undoes the permutation performed by 'this' Inverse operation is calculated the same, regardless of permutation convention

Definition at line 892 of file Array.hh.

◆ as_perm_transform_by()

template<typename T >
ReturnArray< Index > CASM::Array< T >::as_perm_transform_by ( const Array< Index > &  trans_perm) const

Given N distinct objects labeled from 0 to N-1, a permutation 'P_permute' that physically permutes the objects (with labels) in terms of their labels, and a permutation 'L_permute' that permutes their labels only, rewrite 'P_permute' in terms of the relabeling induced by 'L_permute' Rearrange 'this' permutation to form an equivalent permutation for any list that has already been permuted by trans_perm. Does not (nearly certain of this) depend on permutation convention

Definition at line 910 of file Array.hh.

◆ coincidence()

template<typename T >
Index CASM::Array< T >::coincidence ( const Array< T > &  superset) const

Definition at line 590 of file Array.hh.

◆ find()

template<typename T >
Index CASM::Array< T >::find ( const T &  test_elem) const

Definition at line 618 of file Array.hh.

◆ has_fixed_points()

template<typename T >
bool CASM::Array< T >::has_fixed_points

Checks whether any values are equal to their index – only valid for Array<Index>

Definition at line 965 of file Array.hh.

◆ incidences()

template<typename T >
Index CASM::Array< T >::incidences ( const T &  test_elem) const

Definition at line 604 of file Array.hh.

◆ ipermute()

template<typename T >
Array< T > & CASM::Array< T >::ipermute ( const Array< Index > &  perm_array)

Definition at line 849 of file Array.hh.

◆ is_ascending()

template<typename T >
bool CASM::Array< T >::is_ascending

Definition at line 918 of file Array.hh.

◆ is_constant()

template<typename T >
bool CASM::Array< T >::is_constant

Definition at line 940 of file Array.hh.

◆ is_descending()

template<typename T >
bool CASM::Array< T >::is_descending

Definition at line 929 of file Array.hh.

◆ is_permute()

template<typename T >
bool CASM::Array< T >::is_permute

Checks that Array contains values from 0 to perm_array.size()-1 and that no value is repeated does not depend on definition of permutation convention

Definition at line 953 of file Array.hh.

◆ max()

template<typename T >
const T & CASM::Array< T >::max

Definition at line 515 of file Array.hh.

◆ min()

template<typename T >
const T & CASM::Array< T >::min

Definition at line 534 of file Array.hh.

◆ next_permute()

template<typename T >
bool CASM::Array< T >::next_permute

Definition at line 865 of file Array.hh.

◆ operator<()

template<typename T >
bool CASM::Array< T >::operator< ( const Array< T > &  RHS) const

Definition at line 487 of file Array.hh.

◆ operator<<()

template<class T >
std::ostream& CASM::operator<< ( std::ostream &  out,
const Array< T > &  array_out 
)

Definition at line 980 of file Array.hh.

◆ operator=() [1/2]

template<typename T >
Array< T > & CASM::Array< T >::operator= ( const Array< T > &  RHS)

Definition at line 338 of file Array.hh.

◆ operator=() [2/2]

template<typename T >
Array< T > & CASM::Array< T >::operator= ( ReturnArray< T > &  RHS)

Definition at line 365 of file Array.hh.

◆ operator==()

template<typename T >
bool CASM::Array< T >::operator== ( const Array< T > &  RHS) const

Definition at line 472 of file Array.hh.

◆ operator>()

template<typename T >
bool CASM::Array< T >::operator> ( const Array< T > &  RHS) const

Definition at line 501 of file Array.hh.

◆ permute()

template<typename T >
Array< T > & CASM::Array< T >::permute ( const Array< Index > &  perm_array)

Definition at line 832 of file Array.hh.

◆ print_column()

template<typename T >
void CASM::Array< T >::print_column ( std::ostream &  stream,
const std::string &  indent = "" 
) const

Definition at line 656 of file Array.hh.

◆ push_back()

template<typename T >
void CASM::Array< T >::push_back ( const T &  toPush)

Definition at line 431 of file Array.hh.

◆ remove()

template<typename T >
void CASM::Array< T >::remove ( Index  ind)

Definition at line 462 of file Array.hh.

◆ reserve()

template<typename T >
void CASM::Array< T >::reserve ( Index  new_max)

Definition at line 411 of file Array.hh.

◆ resize() [1/2]

template<typename T >
void CASM::Array< T >::resize ( Index  new_N)

Definition at line 390 of file Array.hh.

◆ resize() [2/2]

template<typename T >
void CASM::Array< T >::resize ( Index  new_N,
const T &  fill_val 
)

Definition at line 402 of file Array.hh.

◆ reverse_find()

template<typename T >
Index CASM::Array< T >::reverse_find ( const T &  test_elem) const

Same as find, but starts from the last element of the Array.

Definition at line 631 of file Array.hh.

◆ sequence() [1/2]

template<typename T >
ReturnArray< T > CASM::Array< T >::sequence ( const T &  initial,
const T &  final 
)
static

Returns an array with the sequence (initial, ++initial, ..., final), inclusive requires that operator<() and operator++() are defined on type T

Returns an array with the sequence (initial, ++initial, ..., final), inclusive

Definition at line 275 of file Array.hh.

◆ sequence() [2/2]

template<typename T >
ReturnArray< T > CASM::Array< T >::sequence ( const T &  initial,
const T &  increment,
const T &  final 
)
static

Returns an array with the sequence (initial, initial+increment, ..., final?), inclusive if final is in the sequence requires that operator<() and operator+=() are defined on type T

Returns an array with the sequence (initial, initial+increment, ..., final?), inclusive if final is in the sequence

Definition at line 292 of file Array.hh.

◆ sort() [1/3]

template<typename T >
void CASM::Array< T >::sort

Definition at line 797 of file Array.hh.

◆ sort() [2/3]

template<typename T >
void CASM::Array< T >::sort ( Array< Index > &  ind_order)

Definition at line 780 of file Array.hh.

◆ sort() [3/3]

template<typename T >
template<typename CompareType >
void CASM::Array< T >::sort ( const CompareType &  comp)

quicksort sorting algorithm

  • assumes that CompareType::compare(T a_thing, T b_thing) exists
  • End results is that CompareType::compare(at(i), at(j)) is true for all i<j

Definition at line 677 of file Array.hh.

◆ sub_array()

template<typename T >
ReturnArray< T > CASM::Array< T >::sub_array ( Index  ind_begin,
Index  ind_end 
) const

Definition at line 562 of file Array.hh.

◆ sum()

template<typename T >
T CASM::Array< T >::sum

Definition at line 552 of file Array.hh.

◆ swap() [1/2]

template<typename T >
void CASM::swap ( Array< T > &  A1,
Array< T > &  A2 
)

Definition at line 1004 of file Array.hh.

◆ swap() [2/2]

template<typename T >
void CASM::Array< T >::swap ( Array< T > &  RHS)

Definition at line 371 of file Array.hh.