iterative-solver 0.0
molpro::linalg::itsolv::util Namespace Reference

Classes

struct  ArrayHandlersError
 
class  StringFacet
 Wraps some useful string manipulation functions. More...
 

Functions

template<typename value_type , typename value_type_abs >
void remove_null_vectors (subspace::Matrix< value_type > &lin_trans, std::vector< value_type_abs > &norm, const size_t start, const size_t end, const value_type_abs norm_thresh)
 Remove vectors considered null from the linear transformation matrix. More...
 
template<class ForwardIt , class EndIterator , typename Int >
bool is_iota (ForwardIt it_start, EndIterator it_end, Int value_start)
 Returns true if iterator range contains integers starting with value_start and sequentially incremented by 1, as in std::iota. More...
 
template<class R , class Q >
construct_zeroed_copy (const R &param, array::ArrayHandler< Q, R > &handler)
 Copy R parameter to Q and zero it. This ensures same size and distribution of the copy. More...
 
template<class R , class Q , class P >
void construct_solutions (const VecRef< R > &params, const std::vector< int > &roots, const subspace::Matrix< double > &solutions, const CVecRef< P > &pparams, const CVecRef< Q > &qparams, const CVecRef< Q > &dparams, size_t oP, size_t oQ, size_t oD, array::ArrayHandler< R, R > &handler_rr, array::ArrayHandler< R, P > &handler_rp, array::ArrayHandler< R, Q > &handler_rq)
 Construct solutions. More...
 
template<class Container >
void delete_parameters (std::vector< int > indices, Container &params)
 Removes parameters. More...
 
template<class SFacet >
std::map< std::string, std::string > capitalize_keys (const options_map &options, const SFacet &facet)
 

Function Documentation

◆ capitalize_keys()

template<class SFacet >
std::map< std::string, std::string > molpro::linalg::itsolv::util::capitalize_keys ( const options_map options,
const SFacet &  facet 
)

Returns options map with capitalized keys

Note
SFacet should be util::StringFacet, it is templated to reduce header bloat

◆ construct_solutions()

template<class R , class Q , class P >
void molpro::linalg::itsolv::util::construct_solutions ( const VecRef< R > &  params,
const std::vector< int > &  roots,
const subspace::Matrix< double > &  solutions,
const CVecRef< P > &  pparams,
const CVecRef< Q > &  qparams,
const CVecRef< Q > &  dparams,
size_t  oP,
size_t  oQ,
size_t  oD,
array::ArrayHandler< R, R > &  handler_rr,
array::ArrayHandler< R, P > &  handler_rp,
array::ArrayHandler< R, Q > &  handler_rq 
)

Construct solutions.

Parameters
paramsparameters for storing solutions
rootsroots to construct
solutionssolution matrix in the subspace with solutions in rows
pparamsP space parameters
qparamsQ space parameters
dparamsD space parameters
oPoffset to P space in subspace
oQoffset to Q space in subspace
oDoffset to D space in subspace
handler_rrarray handler
handler_rparray handler
handler_rqarray handler

◆ construct_zeroed_copy()

template<class R , class Q >
Q molpro::linalg::itsolv::util::construct_zeroed_copy ( const R &  param,
array::ArrayHandler< Q, R > &  handler 
)

Copy R parameter to Q and zero it. This ensures same size and distribution of the copy.

◆ delete_parameters()

template<class Container >
void molpro::linalg::itsolv::util::delete_parameters ( std::vector< int >  indices,
Container &  params 
)

Removes parameters.

Parameters
indicesindices of parameters to remove
paramslist of parameters

◆ is_iota()

template<class ForwardIt , class EndIterator , typename Int >
bool molpro::linalg::itsolv::util::is_iota ( ForwardIt  it_start,
EndIterator  it_end,
Int  value_start 
)

Returns true if iterator range contains integers starting with value_start and sequentially incremented by 1, as in std::iota.

◆ remove_null_vectors()

template<typename value_type , typename value_type_abs >
void molpro::linalg::itsolv::util::remove_null_vectors ( subspace::Matrix< value_type > &  lin_trans,
std::vector< value_type_abs > &  norm,
const size_t  start,
const size_t  end,
const value_type_abs  norm_thresh 
)

Remove vectors considered null from the linear transformation matrix.

Parameters
lin_translinear transformation matrix (row-wise)
normnorms of transformed vectors
startstart row to start screening
endexclusive end row to stop screening
norm_threshthreshold to decided if the vector is null