CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::TensorBasis< T > Class Template Reference

#include <Tensor.hh>

+ Inheritance diagram for CASM::TensorBasis< T >:

Detailed Description

template<class T>
class CASM::TensorBasis< T >

Definition at line 215 of file Tensor.hh.

Public Types

typedef Array< Tensor< T > > X1
 
typedef Array< X1X2
 
typedef Array< X2X3
 
typedef Array< X3X4
 
typedef Array< X4X5
 
typedef Array< X5X6
 
typedef Array< X6X7
 
typedef Array< X7X8
 
typedef Array< X8X9
 
typedef Tensor< T > value_type
 
typedef Index size_type
 
typedef Tensor< T > * iterator
 
typedef const Tensor< T > * const_iterator
 

Public Member Functions

double eci (Index i) const
 
double & eci (Index i)
 
void generate_basis (Index Nrank, const SymGroup &sym_group)
 
void generate_basis (Index Nrank, const SymGroup &sym_group, Index Rep_ID)
 
void generate_basis (Index Nrank, const SymGroup &sym_group, const SymGroupRep &perm_group)
 
void make_orthogonal_to (const TensorBasis &ortho_basis)
 
TensorBasisapply_sym (const SymOp &op)
 
void normalize ()
 
void idealize ()
 
bool read (std::istream &stream)
 
Index size () const
 
void swap (Array< Tensor< T > > &RHS)
 
Tensor< T > & at (Index ind)
 
const Tensor< T > & at (Index ind) const
 
const Tensor< T > & operator[] (Index ind) const
 
Tensor< T > & operator[] (Index ind)
 
Tensor< T > & back ()
 
const Tensor< T > & back () const
 
Tensor< T > const * begin () const
 
Tensor< T > * begin ()
 
Tensor< T > const * cbegin () const
 
Tensor< T > const * end () const
 
Tensor< T > * end ()
 
Tensor< T > const * cend () const
 
void push_back (const Tensor< T > &toPush)
 
void pop_back ()
 
void remove (Index ind)
 
void clear ()
 
void resize (Index new_N)
 
void resize (Index new_N, const Tensor< T > &fill_val)
 
void reserve (Index new_max)
 
void sort (const CompareType &comp)
 
void sort (Array< Index > &ind_order)
 
void sort ()
 
Arrayappend (const Array &new_tail)
 
Arrayappend_unique (const Array &new_tail)
 
void swap_elem (Index i, Index j)
 
Arraypermute (const Array< Index > &perm_array)
 
Arrayipermute (const Array< Index > &perm_array)
 
bool next_permute ()
 
ReturnArray< Indexas_perm_inverse () const
 
ReturnArray< Indexas_perm_transform_by (const Array< Index > &trans_perm) const
 
const Tensor< T > & max () const
 
const Tensor< T > & min () const
 
ReturnArray< Tensor< T > > sub_array (Index ind_begin, Index ind_end) const
 
Tensor< T > sum () const
 
bool is_ascending () const
 
bool is_descending () const
 
bool is_constant () const
 
bool is_permute () const
 
bool has_fixed_points () const
 
bool operator== (const Array< Tensor< T > > &RHS) const
 
bool operator!= (const Array< Tensor< T > > &RHS) const
 
bool operator< (const Array< Tensor< T > > &RHS) const
 
bool operator> (const Array< Tensor< T > > &RHS) const
 
bool operator<= (const Array< Tensor< T > > &RHS) const
 
bool operator>= (const Array< Tensor< T > > &RHS) const
 
bool all_in (const Array &superset) const
 
Index coincidence (const Array &superset) const
 
Index incidences (const Tensor< T > &test_elem) const
 
Index find (const Tensor< T > &test_elem) const
 
Index reverse_find (const Tensor< T > &test_elem) const
 Same as find, but starts from the last element of the Array. More...
 
Index almost_find (const Tensor< T > &test_elem, double tol_val=TOL) const
 
Index almost_reverse_find (const Tensor< T > &test_elem, double tol_val=TOL) const
 Same as almost_find, but start from the last element of the Array. More...
 
bool contains (const Tensor< T > &test_elem) const
 
bool almost_contains (const Tensor< T > &test_elem, double tol_val=TOL) const
 
void print_column (std::ostream &stream, const std::string &indent="") const
 

Static Public Member Functions

static ReturnArray< Tensor< T > > sequence (const Tensor< T > &initial, const Tensor< T > &final)
 
static ReturnArray< Tensor< T > > sequence (const Tensor< T > &initial, const Tensor< T > &increment, const Tensor< T > &final)
 

Public Attributes

Array< double > coeffs
 

Static Private Member Functions

static Index ARRAY_MIN_EXTRA_SPACE ()
 
static double ARRAY_EXTENSION_FACTOR ()
 

Private Attributes

Index N
 
Index NMax
 
Tensor< T > * Vals
 

Member Typedef Documentation

◆ const_iterator

typedef const Tensor< T > * CASM::Array< Tensor< T > >::const_iterator
inherited

Definition at line 73 of file Array.hh.

◆ iterator

typedef Tensor< T > * CASM::Array< Tensor< T > >::iterator
inherited

Definition at line 72 of file Array.hh.

◆ size_type

typedef Index CASM::Array< Tensor< T > >::size_type
inherited

Definition at line 71 of file Array.hh.

◆ value_type

typedef Tensor< T > CASM::Array< Tensor< T > >::value_type
inherited

Definition at line 70 of file Array.hh.

◆ X1

typedef Array<Tensor< T > > CASM::Array< Tensor< T > >::X1
inherited

Definition at line 60 of file Array.hh.

◆ X2

typedef Array<X1> CASM::Array< Tensor< T > >::X2
inherited

Definition at line 61 of file Array.hh.

◆ X3

typedef Array<X2> CASM::Array< Tensor< T > >::X3
inherited

Definition at line 62 of file Array.hh.

◆ X4

typedef Array<X3> CASM::Array< Tensor< T > >::X4
inherited

Definition at line 63 of file Array.hh.

◆ X5

typedef Array<X4> CASM::Array< Tensor< T > >::X5
inherited

Definition at line 64 of file Array.hh.

◆ X6

typedef Array<X5> CASM::Array< Tensor< T > >::X6
inherited

Definition at line 65 of file Array.hh.

◆ X7

typedef Array<X6> CASM::Array< Tensor< T > >::X7
inherited

Definition at line 66 of file Array.hh.

◆ X8

typedef Array<X7> CASM::Array< Tensor< T > >::X8
inherited

Definition at line 67 of file Array.hh.

◆ X9

typedef Array<X8> CASM::Array< Tensor< T > >::X9
inherited

Definition at line 68 of file Array.hh.

Member Function Documentation

◆ all_in()

bool CASM::Array< Tensor< T > >::all_in ( const Array< Tensor< T > > &  superset) const
inherited

Definition at line 230 of file Array.hh.

◆ almost_contains()

bool CASM::Array< Tensor< T > >::almost_contains ( const Tensor< T > &  test_elem,
double  tol_val = TOL 
) const
inlineinherited

Definition at line 240 of file Array.hh.

◆ almost_find()

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

Definition at line 236 of file Array.hh.

◆ almost_reverse_find()

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

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

Definition at line 238 of file Array.hh.

◆ append()

Array< Tensor< T > > & CASM::Array< Tensor< T > >::append ( const Array< Tensor< T > > &  new_tail)
inherited

Definition at line 194 of file Array.hh.

◆ append_unique()

Array< Tensor< T > > & CASM::Array< Tensor< T > >::append_unique ( const Array< Tensor< T > > &  new_tail)
inherited

Definition at line 195 of file Array.hh.

◆ ARRAY_EXTENSION_FACTOR()

static double CASM::Array< Tensor< T > >::ARRAY_EXTENSION_FACTOR ( )
inlinestaticprivateinherited

Definition at line 48 of file Array.hh.

◆ ARRAY_MIN_EXTRA_SPACE()

static Index CASM::Array< Tensor< T > >::ARRAY_MIN_EXTRA_SPACE ( )
inlinestaticprivateinherited

Definition at line 47 of file Array.hh.

◆ as_perm_inverse()

ReturnArray< Index > CASM::Array< Tensor< T > >::as_perm_inverse
inherited

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

Definition at line 203 of file Array.hh.

◆ as_perm_transform_by()

ReturnArray< Index > CASM::Array< Tensor< T > >::as_perm_transform_by ( const Array< Index > &  trans_perm) const
inherited

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 204 of file Array.hh.

◆ at() [1/2]

Tensor< T > & CASM::Array< Tensor< T > >::at ( Index  ind)
inlineinherited

Definition at line 140 of file Array.hh.

◆ at() [2/2]

const Tensor< T > & CASM::Array< Tensor< T > >::at ( Index  ind) const
inlineinherited

Definition at line 145 of file Array.hh.

◆ back() [1/2]

Tensor< T > & CASM::Array< Tensor< T > >::back ( )
inlineinherited

Definition at line 160 of file Array.hh.

◆ back() [2/2]

const Tensor< T > & CASM::Array< Tensor< T > >::back ( ) const
inlineinherited

Definition at line 161 of file Array.hh.

◆ begin() [1/2]

Tensor< T > * CASM::Array< Tensor< T > >::begin ( )
inlineinherited

Definition at line 167 of file Array.hh.

◆ begin() [2/2]

Tensor< T > const* CASM::Array< Tensor< T > >::begin ( ) const
inlineinherited

Definition at line 164 of file Array.hh.

◆ cbegin()

Tensor< T > const* CASM::Array< Tensor< T > >::cbegin ( ) const
inlineinherited

Definition at line 166 of file Array.hh.

◆ cend()

Tensor< T > const* CASM::Array< Tensor< T > >::cend ( ) const
inlineinherited

Definition at line 172 of file Array.hh.

◆ clear()

void CASM::Array< Tensor< T > >::clear ( )
inlineinherited

Definition at line 182 of file Array.hh.

◆ coincidence()

Index CASM::Array< Tensor< T > >::coincidence ( const Array< Tensor< T > > &  superset) const
inherited

Definition at line 231 of file Array.hh.

◆ contains()

bool CASM::Array< Tensor< T > >::contains ( const Tensor< T > &  test_elem) const
inlineinherited

Definition at line 239 of file Array.hh.

◆ eci() [1/2]

template<class T >
double& CASM::TensorBasis< T >::eci ( Index  i)
inline

Definition at line 224 of file Tensor.hh.

◆ eci() [2/2]

template<class T >
double CASM::TensorBasis< T >::eci ( Index  i) const
inline

Definition at line 223 of file Tensor.hh.

◆ end() [1/2]

Tensor< T > * CASM::Array< Tensor< T > >::end ( )
inlineinherited

Definition at line 173 of file Array.hh.

◆ end() [2/2]

Tensor< T > const* CASM::Array< Tensor< T > >::end ( ) const
inlineinherited

Definition at line 170 of file Array.hh.

◆ find()

Index CASM::Array< Tensor< T > >::find ( const Tensor< T > &  test_elem) const
inherited

Definition at line 233 of file Array.hh.

◆ has_fixed_points()

bool CASM::Array< Tensor< T > >::has_fixed_points
inherited

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

Definition at line 219 of file Array.hh.

◆ incidences()

Index CASM::Array< Tensor< T > >::incidences ( const Tensor< T > &  test_elem) const
inherited

Definition at line 232 of file Array.hh.

◆ ipermute()

Array< Tensor< T > > & CASM::Array< Tensor< T > >::ipermute ( const Array< Index > &  perm_array)
inherited

Definition at line 200 of file Array.hh.

◆ is_ascending()

bool CASM::Array< Tensor< T > >::is_ascending
inherited

Definition at line 215 of file Array.hh.

◆ is_constant()

bool CASM::Array< Tensor< T > >::is_constant
inherited

Definition at line 217 of file Array.hh.

◆ is_descending()

bool CASM::Array< Tensor< T > >::is_descending
inherited

Definition at line 216 of file Array.hh.

◆ is_permute()

bool CASM::Array< Tensor< T > >::is_permute
inherited

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 218 of file Array.hh.

◆ max()

const Tensor< T > & CASM::Array< Tensor< T > >::max
inherited

Definition at line 207 of file Array.hh.

◆ min()

const Tensor< T > & CASM::Array< Tensor< T > >::min
inherited

Definition at line 208 of file Array.hh.

◆ next_permute()

bool CASM::Array< Tensor< T > >::next_permute
inherited

Definition at line 201 of file Array.hh.

◆ operator!=()

bool CASM::Array< Tensor< T > >::operator!= ( const Array< Tensor< T > > &  RHS) const
inlineinherited

Definition at line 224 of file Array.hh.

◆ operator<()

bool CASM::Array< Tensor< T > >::operator< ( const Array< Tensor< T > > &  RHS) const
inherited

Definition at line 225 of file Array.hh.

◆ operator<=()

bool CASM::Array< Tensor< T > >::operator<= ( const Array< Tensor< T > > &  RHS) const
inlineinherited

Definition at line 227 of file Array.hh.

◆ operator==()

bool CASM::Array< Tensor< T > >::operator== ( const Array< Tensor< T > > &  RHS) const
inherited

Definition at line 223 of file Array.hh.

◆ operator>()

bool CASM::Array< Tensor< T > >::operator> ( const Array< Tensor< T > > &  RHS) const
inherited

Definition at line 226 of file Array.hh.

◆ operator>=()

bool CASM::Array< Tensor< T > >::operator>= ( const Array< Tensor< T > > &  RHS) const
inlineinherited

Definition at line 228 of file Array.hh.

◆ operator[]() [1/2]

Tensor< T > & CASM::Array< Tensor< T > >::operator[] ( Index  ind)
inlineinherited

Definition at line 155 of file Array.hh.

◆ operator[]() [2/2]

const Tensor< T > & CASM::Array< Tensor< T > >::operator[] ( Index  ind) const
inlineinherited

Definition at line 150 of file Array.hh.

◆ permute()

Array< Tensor< T > > & CASM::Array< Tensor< T > >::permute ( const Array< Index > &  perm_array)
inherited

Definition at line 199 of file Array.hh.

◆ pop_back()

void CASM::Array< Tensor< T > >::pop_back ( )
inlineinherited

Definition at line 178 of file Array.hh.

◆ print_column()

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

Definition at line 245 of file Array.hh.

◆ push_back()

void CASM::Array< Tensor< T > >::push_back ( const Tensor< T > &  toPush)
inherited

Definition at line 176 of file Array.hh.

◆ remove()

void CASM::Array< Tensor< T > >::remove ( Index  ind)
inherited

Definition at line 181 of file Array.hh.

◆ reserve()

void CASM::Array< Tensor< T > >::reserve ( Index  new_max)
inherited

Definition at line 188 of file Array.hh.

◆ resize() [1/2]

void CASM::Array< Tensor< T > >::resize ( Index  new_N)
inherited

Definition at line 186 of file Array.hh.

◆ resize() [2/2]

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

Definition at line 187 of file Array.hh.

◆ reverse_find()

Index CASM::Array< Tensor< T > >::reverse_find ( const Tensor< T > &  test_elem) const
inherited

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

Definition at line 235 of file Array.hh.

◆ sequence() [1/2]

ReturnArray< Tensor< T > > CASM::Array< Tensor< T > >::sequence ( const Tensor< T > &  initial,
const Tensor< T > &  final 
)
staticinherited

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 123 of file Array.hh.

◆ sequence() [2/2]

ReturnArray< Tensor< T > > CASM::Array< Tensor< T > >::sequence ( const Tensor< T > &  initial,
const Tensor< T > &  increment,
const Tensor< T > &  final 
)
staticinherited

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 128 of file Array.hh.

◆ size()

Index CASM::Array< Tensor< T > >::size ( ) const
inlineinherited

Definition at line 131 of file Array.hh.

◆ sort() [1/3]

void CASM::Array< Tensor< T > >::sort
inherited

Definition at line 193 of file Array.hh.

◆ sort() [2/3]

void CASM::Array< Tensor< T > >::sort ( Array< Index > &  ind_order)
inherited

Definition at line 192 of file Array.hh.

◆ sort() [3/3]

void CASM::Array< Tensor< T > >::sort ( const CompareType &  comp)
inherited

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 191 of file Array.hh.

◆ sub_array()

ReturnArray< Tensor< T > > CASM::Array< Tensor< T > >::sub_array ( Index  ind_begin,
Index  ind_end 
) const
inherited

Definition at line 211 of file Array.hh.

◆ sum()

Tensor< T > CASM::Array< Tensor< T > >::sum
inherited

Definition at line 213 of file Array.hh.

◆ swap()

void CASM::Array< Tensor< T > >::swap ( Array< Tensor< T > > &  RHS)
inherited

Definition at line 136 of file Array.hh.

◆ swap_elem()

void CASM::Array< Tensor< T > >::swap_elem ( Index  i,
Index  j 
)
inlineinherited

Definition at line 197 of file Array.hh.

Member Data Documentation

◆ coeffs

template<class T >
Array<double> CASM::TensorBasis< T >::coeffs

Definition at line 221 of file Tensor.hh.

◆ N

Index CASM::Array< Tensor< T > >::N
privateinherited

Definition at line 53 of file Array.hh.

◆ NMax

Index CASM::Array< Tensor< T > >::NMax
privateinherited

Definition at line 54 of file Array.hh.

◆ Vals

Tensor< T > * CASM::Array< Tensor< T > >::Vals
privateinherited

Definition at line 55 of file Array.hh.


The documentation for this class was generated from the following file: