votca  1.6-dev
Namespaces | Classes | Typedefs | Functions | Variables
votca::tools Namespace Reference

Namespaces

 Colors
 stores color codes for colorful help output
 
 conv
 

Classes

class  AkimaSpline
 An Akima Spline Class. More...
 
class  Application
 
class  Average
 
class  Calculator
 Base class for all calculators. More...
 
class  Color
 
class  ColorScheme
 
class  ColorSchemeBase
 
class  Correlate
 class to calculate correlations of values More...
 
class  CrossCorrelate
 class to calculate cross correlkations and autocorrelations More...
 
class  csDefault
 
class  csRGB
 
class  CubicSpline
 A cubic spline class. More...
 
class  Database
 SQLite Database wrapper. More...
 
class  DataCollection
 This class handles a set of arrays which can be identified by name tags. More...
 
class  Edge
 Connects to vertices. More...
 
class  EdgeContainer
 EdgeContainer is responsible for operations on groups of edges. More...
 
class  Elements
 information about an element More...
 
struct  globals
 class to store global variables More...
 
class  Graph
 
class  Graph_BF_Visitor
 
class  Graph_DF_Visitor
 
class  GraphDistVisitor
 
class  GraphNode
 A graph node that will take a variety of different values. More...
 
class  GraphVisitor
 
class  Histogram
 class to generate histograms More...
 
class  HistogramNew
 class to generate histograms More...
 
class  Identity
 Information about Identity. More...
 
class  LinSpline
 A Linear Spline Class. More...
 
class  matrix
 Position & Velocity Matrix. More...
 
class  Mutex
 Convenient class for Mutexes. More...
 
class  Name
 Name object. More...
 
class  ObjectFactory
 template class for object factory More...
 
class  ObjectFactoryRegister
 
class  ParseXML
 XML SAX parser (wrapper for expat) More...
 
class  Property
 class to manage program options with xml serialization functionality More...
 
class  PropertyIOManipulator
 Manipulates the format state of the output stream. More...
 
class  Random2
 MARSAGLIA pseudo random number generator. More...
 
class  RangeParser
 RangeParser. More...
 
class  ReducedEdge
 Connects two vertices, also stores the vertices between the endpoints. More...
 
class  ReducedGraph
 Contains a graph that consits of vertices with degree of 1 or greater than 3. More...
 
class  Spline
 Spline Class. More...
 
class  Statement
 Wrapper for sqlite prepared statements. More...
 
class  Table
 class to store tables like rdfs, tabulated potentials, etc More...
 
class  Thread
 Framework for threaded execution. More...
 
class  Tokenizer
 break string into words More...
 
class  TypeConverter
 Provides a means to reduce cross dependency of header files. More...
 
class  vec
 Vector class for a 3 component vector. More...
 

Typedefs

typedef unsigned char byte_t
 
typedef unsigned short word_t
 
typedef unsigned long dword_t
 

Functions

ostream & operator<< (ostream &out, Correlate &c)
 
ostream & operator<< (ostream &out, CrossCorrelate &c)
 
ostream & operator<< (ostream &out, DataCollection< double >::selection &sel)
 
const Edge DUMMY_EDGE (std::numeric_limits< int >::max(), std::numeric_limits< int >::max())
 
template<typename T >
static bool isApproximatelyEqual (T a, T b, T tolerance)
 
std::istream & getline (std::istream &is, std::string &str)
 Wrapper for a getline function. More...
 
bool cmpVertNodePair (std::pair< int, GraphNode > &id_and_node1, std::pair< int, GraphNode > &id_and_node2)
 Compare function pair<int,GraphNode> object. More...
 
bool singleNetwork (Graph &graph, GraphVisitor &graph_visitor)
 Determine if every vertex is connected to every other one through some combination of edges. More...
 
std::set< EdgeexploreBranch (Graph g, int starting_vertex, const Edge &edge)
 Explore one of the branches if exploration is initiated at vertex starting_vertex. More...
 
ReducedGraph reduceGraph (Graph graph)
 Will take a graph and reduce it, by removing all vertices with degree of 2. More...
 
std::vector< GraphdecoupleIsolatedSubGraphs (Graph graph)
 Break graph into smaller graph instances if the network is made up of isolated sub networks. More...
 
void exploreGraph (Graph &graph, GraphVisitor &graph_visitor)
 Explore a graph with a graph visitor. More...
 
template<typename GV >
std::string findStructureId (Graph &graph)
 Find a unique identifier that describes graph structure. More...
 
bool cmpNode (GraphNode gn1, GraphNode gn2)
 Comparison function to be used with stl sort algorithm. More...
 
ostream & operator<< (ostream &out, Histogram &h)
 
std::ostream & operator<< (std::ostream &out, HistogramNew &h)
 
template<typename Target , typename Source >
Target lexical_cast (const Source &arg, const std::string &error)
 
void linalg_constrained_qrsolve (Eigen::VectorXd &x, Eigen::MatrixXd &A, const Eigen::VectorXd &b, const Eigen::MatrixXd &constr)
 solves A*x=b under the constraint B*x = 0 More...
 
bool linalg_eigenvalues (Eigen::MatrixXd &A, Eigen::VectorXd &E, Eigen::MatrixXd &V, int nmax)
 solves A*V=E*V for the first n eigenvalues More...
 
bool linalg_eigenvalues (Eigen::MatrixXf &A, Eigen::VectorXf &E, Eigen::MatrixXf &V, int nmax)
 
std::ostream & operator<< (std::ostream &out, matrix &m)
 
matrix operator| (const vec &a, const vec &b)
 
matrix operator* (const matrix &r, const double &d)
 
matrix operator* (const double &d, const matrix &m)
 
vec operator* (const matrix &r, const vec &a)
 
matrix operator/ (const matrix &r, const double &d)
 
matrix operator+ (const matrix &r, const matrix &v)
 
matrix operator- (const matrix &r, const matrix &v)
 
int cjcbi (matrix &a, matrix &v, double eps=1e-10, int jt=100)
 
template<class parent , class T >
parent * create_policy_new ()
 
bool load_property_from_xml (Property &p, std::string file)
 
template<>
std::string Property::as< std::string > () const
 
template<>
Eigen::VectorXd Property::as< Eigen::VectorXd > () const
 
template<>
Eigen::Vector3d Property::as< Eigen::Vector3d > () const
 
template<>
std::vector< unsigned int > Property::as< std::vector< unsigned int > > () const
 
template<>
std::vector< int > Property::as< std::vector< int > > () const
 
template<>
std::vector< double > Property::as< std::vector< double > > () const
 
void throwRuntimeError (std::string message)
 
std::ostream & operator<< (std::ostream &out, const RangeParser &rp)
 
std::ostream & operator<< (std::ostream &out, const Table &t)
 
int wildcmp (const char *wild, const char *string)
 
bool operator== (const vec &v1, const vec &v2)
 
bool operator!= (const vec &v1, const vec &v2)
 
vec operator+ (const vec &v1, const vec &v2)
 
vec operator- (const vec &v1, const vec &v2)
 
vec operator- (const vec &v1)
 
vec operator* (const vec &v1, const double &d)
 
vec operator* (const double &d, const vec &v1)
 
vec operator/ (const vec &v1, const double &d)
 
std::ostream & operator<< (std::ostream &out, const vec &v)
 
std::istream & operator>> (std::istream &in, vec &v)
 
double operator* (const vec &v1, const vec &v2)
 dot product More...
 
vec operator^ (const vec &v1, const vec &v2)
 cross product More...
 
vec elementwiseproduct (const vec &v1, const vec &v2)
 elementwise product More...
 
vec elementwisedivison (const vec &v1, const vec &v2)
 elementwise division More...
 
double abs (const vec &v)
 
double maxnorm (const vec &v)
 
const std::string & ToolsVersionStr ()
 
ostream & operator<< (ostream &os, const Edge ed)
 
ostream & operator<< (ostream &os, const EdgeContainer edgecontainer)
 
bool nodeForEveryVertex_ (vector< int > vertices, unordered_map< int, GraphNode > nodes)
 
ostream & operator<< (ostream &os, const Graph graph)
 
bool cmpVertNodePair (pair< int, GraphNode > &id_and_node1, pair< int, GraphNode > &id_and_node2)
 Compare function pair<int,GraphNode> object. More...
 
string sig_fig_ (double val, int sf)
 
string getIntStringId_ (const unordered_map< string, int > int_vals)
 
string getDoubleStringId_ (const unordered_map< string, double > double_vals)
 
string getStrStringId_ (const unordered_map< string, string > str_vals)
 
ostream & operator<< (ostream &os, const GraphNode gn)
 
void parce_string (string line, string delims, vector< string > *result)
 
void start_hndl (void *data, const char *el, const char **attr)
 
void end_hndl (void *data, const char *el)
 
void char_hndl (void *data, const char *txt, int txtlen)
 
bool load_property_from_xml (Property &p, string filename)
 
void PrintNodeTXT (std::ostream &out, Property &p, const int start_level, int level=0, string prefix="", string offset="")
 
void PrintNodeXML (std::ostream &out, Property &p, PropertyIOManipulator *piom, int level=0, string offset="")
 
void PrintNodeTEX (std::ostream &out, Property &p, PropertyIOManipulator *piom, int level=0, string prefix="")
 
void PrintNodeHLP (std::ostream &out, Property &p, const int start_level=0, int level=0, string prefix="", string offset="")
 
std::ostream & operator<< (std::ostream &out, Property &p)
 
PropertyIOManipulator XML (PropertyIOManipulator::XML)
 
PropertyIOManipulator TXT (PropertyIOManipulator::TXT)
 
PropertyIOManipulator TEX (PropertyIOManipulator::TEX)
 
PropertyIOManipulator HLP (PropertyIOManipulator::HLP)
 
void moveVertexWithSmallestValueToEnds_ (vector< int > &vertices)
 
bool verticesShouldBeReversed_ (vector< int > &vertices)
 
ostream & operator<< (ostream &os, const ReducedEdge &edge)
 
bool compareChainWithChains_ (const vector< int > &chain, const vector< vector< int >> &chains)
 Function will compare a chain with a vector of chains. More...
 
set< int > getVertexJunctions_ (const vector< ReducedEdge > &reduced_edges)
 Given a vector of Reduced Edges will find and return junctions if any exist. More...
 
void addEdgeIfNotLoop_ (vector< Edge > &edges, const ReducedEdge reduced_edge, unordered_map< Edge, vector< vector< int >>> &expanded_edges)
 
void orderChainAfterInitialVertex_ (vector< int > &chain)
 This is a helper function used to help store the vertex chain in a reproducable order. More...
 
bool reorderAndStoreChainIfDoesNotExist_ (vector< Edge > &edges, unordered_map< Edge, vector< vector< int >>> &expanded_edges, vector< int > chain, int vertex, size_t &chain_index)
 
set< int > getAllVertices_ (const std::vector< ReducedEdge > &reduced_edges)
 
set< int > getAllConnectedVertices_ (const unordered_map< Edge, vector< vector< int >>> &expanded_edges)
 
ostream & operator<< (ostream &os, const ReducedGraph graph)
 
istream & operator>> (istream &in, Table &t)
 
void * runwrapper (void *arg)
 

Variables

Color< csDefaultDEFAULT_COLORS
 
PropertyIOManipulator XML
 
PropertyIOManipulator TXT
 
PropertyIOManipulator TEX
 
PropertyIOManipulator HLP
 
static const std::string version_str
 
static const std::string version_str
 

Typedef Documentation

◆ byte_t

typedef unsigned char votca::tools::byte_t

Definition at line 24 of file types.h.

◆ dword_t

typedef unsigned long votca::tools::dword_t

Definition at line 26 of file types.h.

◆ word_t

typedef unsigned short votca::tools::word_t

Definition at line 25 of file types.h.

Function Documentation

◆ abs()

double votca::tools::abs ( const vec v)
inline

Definition at line 320 of file vec.h.

◆ addEdgeIfNotLoop_()

void votca::tools::addEdgeIfNotLoop_ ( vector< Edge > &  edges,
const ReducedEdge  reduced_edge,
unordered_map< Edge, vector< vector< int >>> &  expanded_edges 
)

function adds an edge to an unordered_map and a vector if it is found to not be a loop

A loop is an edge that essentially makes a circle. In an edge that is a loop will have both end points equal to the samve vertex. E.g. a reduced edge like this:

Edge Expanded edge (chain of vertices) 2, 2 : 2 - 4 - 3 - 5 - 2

Graph

2 - 4 | | 5 - 3

Reduced Graph

  • 2 |_|
Parameters
[in,out]-vector of edges, an edge is added to the vector if it is not a loop
[in]-a reduced edge, the edge to be added
[in,out]-an unordered_map that stores the edge and its chain if it is found to not be a loop

Definition at line 149 of file reducedgraph.cc.

◆ char_hndl()

void votca::tools::char_hndl ( void *  data,
const char *  txt,
int  txtlen 
)

Definition at line 117 of file property.cc.

◆ cjcbi()

int votca::tools::cjcbi ( matrix a,
matrix v,
double  eps = 1e-10,
int  jt = 100 
)

Definition at line 69 of file matrix.cc.

◆ cmpNode()

bool votca::tools::cmpNode ( GraphNode  gn1,
GraphNode  gn2 
)

Comparison function to be used with stl sort algorithm.

Given a vector of graph node objects this function can be used to sort them they are sorted based on the contents of the graphnode which are summarized in the graph nodes string id. E.g.

vector<GraphNode> vec_gn = { gn1, gn2,...etc };

sort(vec_gn.begin(),vec_gn.end(),cmpNode);

Definition at line 192 of file graphnode.cc.

◆ cmpVertNodePair() [1/2]

bool votca::tools::cmpVertNodePair ( std::pair< int, GraphNode > &  id_and_node1,
std::pair< int, GraphNode > &  id_and_node2 
)

Compare function pair<int,GraphNode> object.

This function is meant to be used with the stl sort algorithm. It will sort a vector of pairs containing the vertex ids and the graphnodes. Only the contetns of the graph node object are used to determine precidence e.g.

pair<int,GraphNode> pr_grn1{ 1, gn }; pair<int,GraphNode> pr_grn2{ 2, gn2 };

vector<pair<int,GraphNode> > vec_pr_gn = { pr_grn1, pr_grn2 , ... etc };

sort(vec_pr_gn.begin(),vec_pr_gn.end(),cmpVertNodePair);

Definition at line 167 of file graph.cc.

◆ cmpVertNodePair() [2/2]

bool votca::tools::cmpVertNodePair ( std::pair< int, GraphNode > &  id_and_node1,
std::pair< int, GraphNode > &  id_and_node2 
)

Compare function pair<int,GraphNode> object.

This function is meant to be used with the stl sort algorithm. It will sort a vector of pairs containing the vertex ids and the graphnodes. Only the contetns of the graph node object are used to determine precidence e.g.

pair<int,GraphNode> pr_grn1{ 1, gn }; pair<int,GraphNode> pr_grn2{ 2, gn2 };

vector<pair<int,GraphNode> > vec_pr_gn = { pr_grn1, pr_grn2 , ... etc };

sort(vec_pr_gn.begin(),vec_pr_gn.end(),cmpVertNodePair);

Definition at line 167 of file graph.cc.

◆ compareChainWithChains_()

bool votca::tools::compareChainWithChains_ ( const vector< int > &  chain,
const vector< vector< int >> &  chains 
)

Function will compare a chain with a vector of chains.

If the one of the chains in the vector of chains is equivalent will return true. A chain is simply a vector of integers where each integer represents a vertex along an edge. The vertices appear in the chain in the same order as they exist in a graph.

Definition at line 44 of file reducedgraph.cc.

◆ create_policy_new()

template<class parent , class T >
parent* votca::tools::create_policy_new ( )

Definition at line 88 of file objectfactory.h.

◆ decoupleIsolatedSubGraphs()

vector< Graph > votca::tools::decoupleIsolatedSubGraphs ( Graph  graph)

Break graph into smaller graph instances if the network is made up of isolated sub networks.

This algorithm will determine if there are groups of vertices that are connected, but where there are no connections shared between the groups. These groups will be brocken up into their own Graph instances. E.g. Take a graph with the following vertices and connections

Graph 1:

1 - 2 - 3 | | 8 - 9 - 10 11 4 - 5 - 6 -7

decoupling the graph into sub graphs will break the islands up into individual graphs:

Sub Graph 1 Sub Graph 2 Sub Graph 3

1 - 2 - 3 | | 8 - 9 - 10 11 4 - 5 - 6 -7

Parameters
[in]-Graph instance
Returns
- vector containing shared pointers to all the sub graphs if there are no subgraphs than the input graph is returned.

Definition at line 237 of file graphalgorithm.cc.

◆ DUMMY_EDGE()

const Edge votca::tools::DUMMY_EDGE ( std::numeric_limits< int >  ::max(),
std::numeric_limits< int >  ::max() 
)

◆ elementwisedivison()

vec votca::tools::elementwisedivison ( const vec v1,
const vec v2 
)
inline

elementwise division

Definition at line 315 of file vec.h.

◆ elementwiseproduct()

vec votca::tools::elementwiseproduct ( const vec v1,
const vec v2 
)
inline

elementwise product

Definition at line 309 of file vec.h.

◆ end_hndl()

static void votca::tools::end_hndl ( void *  data,
const char *  el 
)

Definition at line 39 of file parsexml.cc.

◆ exploreBranch()

std::set< Edge > votca::tools::exploreBranch ( Graph  g,
int  starting_vertex,
const Edge edge 
)

Explore one of the branches if exploration is initiated at vertex starting_vertex.

The edge is used to determine which branch is to be explored. The edge must be an edge connected to the starting_vertex.

Take the following

1 - 2 - 3 - 4 - 5 | | 6 - 7 - 8

If our graph is reprsented by the above depiction and vertex 3 is chosen as our starting vertex, we are left with 3 edges to choose from Edges:

2 - 3 3 - 4 3 - 6

If we pick edge 3 - 4 or 3 - 6 the returned set of edges will consist of the loop

    3 - 4 - 5
    |       |
    6 - 7 - 8

If instead Edge 2 - 3 is picked, the following set of edges would be returned

1 - 2 - 3

Parameters
[in]-Graph instance
[in]-int starting vertex, where the exploration begins
[in]-the edge indicating which branch is to be explored
Returns
- set of edges in the branch that were explored

Definition at line 46 of file graphalgorithm.cc.

◆ exploreGraph()

void votca::tools::exploreGraph ( Graph graph,
GraphVisitor graph_visitor 
)

Explore a graph with a graph visitor.

This function will simply explore a graph, any information gained from the exploration will depend on the graph visitor used. Note that the Graph visitor is the base class which will not work on its own. The purpose of doing this is to make use of polymorphism.

Parameters
[in,out]-Graph reference instance
[in,out]-graph visitor

Definition at line 284 of file graphalgorithm.cc.

◆ findStructureId()

template<typename GV >
std::string votca::tools::findStructureId ( Graph graph)

Find a unique identifier that describes graph structure.

This algorithm is designed to explore the topology of the graph and return an identifier in the form of the string that is unique to the topology. It does this by taking into account the contents of the graphnodes. How it does this is specific to the graph visitor specified.

Parameters
[in,out]-Graph reference instance
Returns
- string identifier

Definition at line 177 of file graphalgorithm.h.

◆ getAllConnectedVertices_()

set<int> votca::tools::getAllConnectedVertices_ ( const unordered_map< Edge, vector< vector< int >>> &  expanded_edges)

Definition at line 244 of file reducedgraph.cc.

◆ getAllVertices_()

set<int> votca::tools::getAllVertices_ ( const std::vector< ReducedEdge > &  reduced_edges)

Definition at line 233 of file reducedgraph.cc.

◆ getDoubleStringId_()

string votca::tools::getDoubleStringId_ ( const unordered_map< string, double >  double_vals)

Turns the map of doubles into a string that is sorted alphabetically by the keys

Definition at line 67 of file graphnode.cc.

◆ getIntStringId_()

string votca::tools::getIntStringId_ ( const unordered_map< string, int >  int_vals)

Turns the map of ints into a string that is sorted alphabetically by the keys

Definition at line 51 of file graphnode.cc.

◆ getline()

std::istream& votca::tools::getline ( std::istream &  is,
std::string &  str 
)
inline

Wrapper for a getline function.

Removes Windows end-of-line character

Definition at line 34 of file getline.h.

◆ getStrStringId_()

string votca::tools::getStrStringId_ ( const unordered_map< string, string >  str_vals)

Turns the map of strings into a string that is sorted alphabetically by the keys

Definition at line 83 of file graphnode.cc.

◆ getVertexJunctions_()

set<int> votca::tools::getVertexJunctions_ ( const vector< ReducedEdge > &  reduced_edges)

Given a vector of Reduced Edges will find and return junctions if any exist.

A junction is a vertex in a graph that has 3 or more edges eminating from it.

Consider three reduced edges given by

Edge Reduced Edge when Expanded (chain of vertices) 1, 5 : 1 - 3 - 4 - 6 - 5 5, 10 : 5 - 2 - 10 5, 9 : 5 - 8 - 9

Graph:

1 - 3 - 4 - 6 - 5 - 2 - 10 | 8 - 9

Reduced Graph:

1 - 5 - 10 | 9

Here vertex 5 would be found to be a junction

Parameters
[in,out]-vector of reduced edges
Returns
- set of integers containing junctions

Definition at line 92 of file reducedgraph.cc.

◆ HLP()

PropertyIOManipulator votca::tools::HLP ( PropertyIOManipulator::HLP  )

◆ isApproximatelyEqual()

template<typename T >
static bool votca::tools::isApproximatelyEqual ( a,
b,
tolerance 
)
static

Definition at line 40 of file floatingpointcomparison.h.

◆ lexical_cast()

template<typename Target , typename Source >
Target votca::tools::lexical_cast ( const Source &  arg,
const std::string &  error 
)
inline

Wrapper for boost::lexical_cast with improved error messages

Parameters
argvariable to convert
erroradditional error text
Returns
converted value

Definition at line 35 of file lexical_cast.h.

◆ linalg_constrained_qrsolve()

void votca::tools::linalg_constrained_qrsolve ( Eigen::VectorXd &  x,
Eigen::MatrixXd &  A,
const Eigen::VectorXd &  b,
const Eigen::MatrixXd &  constr 
)

solves A*x=b under the constraint B*x = 0

Parameters
xstorage for x
Amatrix for linear equation system
binhomogenity
constrconstrained condition

This function implements the qrsolver under constraints

Definition at line 24 of file linalg.cc.

◆ linalg_eigenvalues() [1/2]

bool votca::tools::linalg_eigenvalues ( Eigen::MatrixXd &  A,
Eigen::VectorXd &  E,
Eigen::MatrixXd &  V,
int  nmax 
)

solves A*V=E*V for the first n eigenvalues

Parameters
Asymmetric matrix to diagonalize, is destroyed during iteration
E,eigenvalues
V,eigenvectors,eachcolumn is one eigenvector
nmaxnumber of eigenvalues to return

This function is only useful if MKL is used, wraps LAPACKE_ssyevx/LAPACKE_dsyevx

Definition at line 66 of file linalg.cc.

◆ linalg_eigenvalues() [2/2]

bool votca::tools::linalg_eigenvalues ( Eigen::MatrixXf &  A,
Eigen::VectorXf &  E,
Eigen::MatrixXf &  V,
int  nmax 
)

Definition at line 116 of file linalg.cc.

◆ load_property_from_xml() [1/2]

bool votca::tools::load_property_from_xml ( Property p,
string  filename 
)

Definition at line 125 of file property.cc.

◆ load_property_from_xml() [2/2]

bool votca::tools::load_property_from_xml ( Property p,
std::string  file 
)

◆ maxnorm()

double votca::tools::maxnorm ( const vec v)
inline

Definition at line 322 of file vec.h.

◆ moveVertexWithSmallestValueToEnds_()

void votca::tools::moveVertexWithSmallestValueToEnds_ ( vector< int > &  vertices)

Given a chain of vertices where the end points are the same this method will rotate the chain so that the vertex with the smallest value is at the end points e.g.

3 - 4 - 5 - 9 - 2 - 8 - 3

The method will return the chain as

2 - 8 - 3 - 4 - 5 - 9 - 2

Notice that the order is preserved, because it is assumed that the chain makes a loop.

Definition at line 43 of file reducededge.cc.

◆ nodeForEveryVertex_()

bool votca::tools::nodeForEveryVertex_ ( vector< int >  vertices,
unordered_map< int, GraphNode nodes 
)

Definition at line 32 of file graph.cc.

◆ operator!=()

bool votca::tools::operator!= ( const vec v1,
const vec v2 
)
inline

Definition at line 209 of file vec.h.

◆ operator*() [1/6]

vec votca::tools::operator* ( const vec v1,
const double &  d 
)
inline

Definition at line 257 of file vec.h.

◆ operator*() [2/6]

vec votca::tools::operator* ( const double &  d,
const vec v1 
)
inline

Definition at line 259 of file vec.h.

◆ operator*() [3/6]

double votca::tools::operator* ( const vec v1,
const vec v2 
)
inline

dot product

Definition at line 298 of file vec.h.

◆ operator*() [4/6]

matrix votca::tools::operator* ( const matrix r,
const double &  d 
)
inline

Definition at line 327 of file matrix.h.

◆ operator*() [5/6]

matrix votca::tools::operator* ( const double &  d,
const matrix m 
)
inline

Definition at line 331 of file matrix.h.

◆ operator*() [6/6]

vec votca::tools::operator* ( const matrix r,
const vec a 
)
inline

Definition at line 337 of file matrix.h.

◆ operator+() [1/2]

vec votca::tools::operator+ ( const vec v1,
const vec v2 
)
inline

Definition at line 249 of file vec.h.

◆ operator+() [2/2]

matrix votca::tools::operator+ ( const matrix r,
const matrix v 
)
inline

Definition at line 342 of file matrix.h.

◆ operator-() [1/3]

vec votca::tools::operator- ( const vec v1,
const vec v2 
)
inline

Definition at line 251 of file vec.h.

◆ operator-() [2/3]

vec votca::tools::operator- ( const vec v1)
inline

Definition at line 253 of file vec.h.

◆ operator-() [3/3]

matrix votca::tools::operator- ( const matrix r,
const matrix v 
)
inline

Definition at line 345 of file matrix.h.

◆ operator/() [1/2]

vec votca::tools::operator/ ( const vec v1,
const double &  d 
)
inline

Definition at line 261 of file vec.h.

◆ operator/() [2/2]

matrix votca::tools::operator/ ( const matrix r,
const double &  d 
)
inline

Definition at line 339 of file matrix.h.

◆ operator<<() [1/16]

ostream& votca::tools::operator<< ( ostream &  out,
Correlate c 
)
inline

Definition at line 53 of file correlate.h.

◆ operator<<() [2/16]

ostream& votca::tools::operator<< ( ostream &  os,
const Edge  ed 
)

Definition at line 73 of file edge.cc.

◆ operator<<() [3/16]

ostream& votca::tools::operator<< ( ostream &  out,
CrossCorrelate c 
)
inline

Definition at line 78 of file crosscorrelate.h.

◆ operator<<() [4/16]

ostream& votca::tools::operator<< ( ostream &  out,
Histogram h 
)
inline

Definition at line 93 of file histogram.h.

◆ operator<<() [5/16]

std::ostream& votca::tools::operator<< ( std::ostream &  out,
const RangeParser rp 
)
inline

Definition at line 117 of file rangeparser.h.

◆ operator<<() [6/16]

std::ostream& votca::tools::operator<< ( std::ostream &  out,
const Table t 
)
inline

Definition at line 126 of file table.h.

◆ operator<<() [7/16]

ostream& votca::tools::operator<< ( ostream &  os,
const Graph  graph 
)

Definition at line 158 of file graph.cc.

◆ operator<<() [8/16]

ostream& votca::tools::operator<< ( ostream &  os,
const ReducedEdge edge 
)

Definition at line 164 of file reducededge.cc.

◆ operator<<() [9/16]

std::ostream& votca::tools::operator<< ( std::ostream &  out,
HistogramNew h 
)
inline

Definition at line 173 of file histogramnew.h.

◆ operator<<() [10/16]

ostream& votca::tools::operator<< ( ostream &  os,
const GraphNode  gn 
)

Definition at line 176 of file graphnode.cc.

◆ operator<<() [11/16]

ostream& votca::tools::operator<< ( ostream &  os,
const EdgeContainer  edgecontainer 
)

Definition at line 184 of file edgecontainer.cc.

◆ operator<<() [12/16]

ostream & votca::tools::operator<< ( ostream &  out,
DataCollection< double >::selection &  sel 
)

Definition at line 24 of file datacollection.cc.

◆ operator<<() [13/16]

std::ostream& votca::tools::operator<< ( std::ostream &  out,
const vec v 
)
inline

Definition at line 263 of file vec.h.

◆ operator<<() [14/16]

std::ostream& votca::tools::operator<< ( std::ostream &  out,
matrix m 
)
inline

Definition at line 306 of file matrix.h.

◆ operator<<() [15/16]

std::ostream& votca::tools::operator<< ( std::ostream &  out,
Property p 
)

Definition at line 390 of file property.cc.

◆ operator<<() [16/16]

ostream& votca::tools::operator<< ( ostream &  os,
const ReducedGraph  graph 
)

Definition at line 392 of file reducedgraph.cc.

◆ operator==()

bool votca::tools::operator== ( const vec v1,
const vec v2 
)
inline

Definition at line 204 of file vec.h.

◆ operator>>() [1/2]

istream& votca::tools::operator>> ( istream &  in,
Table t 
)

Definition at line 85 of file table.cc.

◆ operator>>() [2/2]

std::istream& votca::tools::operator>> ( std::istream &  in,
vec v 
)
inline

Definition at line 268 of file vec.h.

◆ operator^()

vec votca::tools::operator^ ( const vec v1,
const vec v2 
)
inline

cross product

Definition at line 303 of file vec.h.

◆ operator|()

matrix votca::tools::operator| ( const vec a,
const vec b 
)
inline

Definition at line 313 of file matrix.h.

◆ orderChainAfterInitialVertex_()

void votca::tools::orderChainAfterInitialVertex_ ( vector< int > &  chain)

This is a helper function used to help store the vertex chain in a reproducable order.

Ordering chains in a reproducable manner enable quicker comparison between chains.

E.g. Given a chain

End Point 1 v 1 - 4 - 3 - 5 - 6 - 2 - 1 ^ End Point 2

This function will ensure that it is reordered such that the next consecutive number in the chain after end point 2 is the lower number, in this case the two numbers that are compared are 4 and 2. The 2 is smaller so the chain is reordered.

1 - 2 - 6 - 5 - 3 - 4 - 1

Parameters
[in,out]-vector of integers containing the chain

Definition at line 190 of file reducedgraph.cc.

◆ parce_string()

void votca::tools::parce_string ( string  line,
string  delims,
vector< string > *  result 
)

Definition at line 29 of file parcer.cc.

◆ PrintNodeHLP()

void votca::tools::PrintNodeHLP ( std::ostream &  out,
Property p,
const int  start_level = 0,
int  level = 0,
string  prefix = "",
string  offset = "" 
)

Definition at line 326 of file property.cc.

◆ PrintNodeTEX()

void votca::tools::PrintNodeTEX ( std::ostream &  out,
Property p,
PropertyIOManipulator piom,
int  level = 0,
string  prefix = "" 
)

Definition at line 251 of file property.cc.

◆ PrintNodeTXT()

void votca::tools::PrintNodeTXT ( std::ostream &  out,
Property p,
const int  start_level,
int  level = 0,
string  prefix = "",
string  offset = "" 
)

Definition at line 158 of file property.cc.

◆ PrintNodeXML()

void votca::tools::PrintNodeXML ( std::ostream &  out,
Property p,
PropertyIOManipulator piom,
int  level = 0,
string  offset = "" 
)

Definition at line 183 of file property.cc.

◆ Property::as< Eigen::Vector3d >()

template<>
Eigen::Vector3d votca::tools::Property::as< Eigen::Vector3d > ( ) const
inline

Definition at line 333 of file property.h.

◆ Property::as< Eigen::VectorXd >()

template<>
Eigen::VectorXd votca::tools::Property::as< Eigen::VectorXd > ( ) const
inline

Definition at line 320 of file property.h.

◆ Property::as< std::string >()

template<>
std::string votca::tools::Property::as< std::string > ( ) const
inline

Definition at line 301 of file property.h.

◆ Property::as< std::vector< double > >()

template<>
std::vector<double> votca::tools::Property::as< std::vector< double > > ( ) const
inline

Definition at line 365 of file property.h.

◆ Property::as< std::vector< int > >()

template<>
std::vector<int> votca::tools::Property::as< std::vector< int > > ( ) const
inline

Definition at line 357 of file property.h.

◆ Property::as< std::vector< unsigned int > >()

template<>
std::vector<unsigned int> votca::tools::Property::as< std::vector< unsigned int > > ( ) const
inline

Definition at line 348 of file property.h.

◆ reduceGraph()

ReducedGraph votca::tools::reduceGraph ( Graph  graph)

Will take a graph and reduce it, by removing all vertices with degree of 2.

The purpose of this algorithm is to introduce new functionality that reduces the complexity of a graph by removing any vertex that has a degree of 2. By exploring a reduced graph instead of a full graph insight can still be gained into the topology of the graph but with better performance. The edges of the reduced graph can be expanded if needed to determine how they correspond to the full graph. Take:

1 - 2 - 3 - 4 - 5 - 6 | | 7 - 8 - 9

This would be reduced to

1 - 2 - 4 - 6 | _ |

A total of 4 vertices with 4 edges as opposed to 9 vertices and 9 edges.

Parameters
[in]-graph instance
Returns
- a reduced graph

This class is to help keep track of which vertices have and have not been explored.

It is only used within the function and hence the encapsulation, it is not a public class and is not meant to be.

This class is to help keep track of which vertices have and have not been explored.

It is only used within the function and hence the encapsulation, it is not a public class and is not meant to be.

Definition at line 97 of file graphalgorithm.cc.

◆ reorderAndStoreChainIfDoesNotExist_()

bool votca::tools::reorderAndStoreChainIfDoesNotExist_ ( vector< Edge > &  edges,
unordered_map< Edge, vector< vector< int >>> &  expanded_edges,
vector< int >  chain,
int  vertex,
size_t &  chain_index 
)

Definition at line 207 of file reducedgraph.cc.

◆ runwrapper()

void* votca::tools::runwrapper ( void *  arg)

Definition at line 27 of file thread.cc.

◆ sig_fig_()

string votca::tools::sig_fig_ ( double  val,
int  sf 
)

Converts a double into a string with max number of significant figures indicated by sf

Definition at line 41 of file graphnode.cc.

◆ singleNetwork()

bool votca::tools::singleNetwork ( Graph graph,
GraphVisitor graph_visitor 
)

Determine if every vertex is connected to every other one through some combination of edges.

The purpose of this algorithm is to simply determine if the graph is one large network or not. If it is it means every vertex is connected to every other one by 1 or more series of edges.

Parameters
[in]-Graph instance
[in,out]-Graph visitor reference instance used to explore the graph
Returns
- Boolean value (true - if single network)

Definition at line 39 of file graphalgorithm.cc.

◆ start_hndl()

static void votca::tools::start_hndl ( void *  data,
const char *  el,
const char **  attr 
)

Definition at line 29 of file parsexml.cc.

◆ TEX()

PropertyIOManipulator votca::tools::TEX ( PropertyIOManipulator::TEX  )

◆ throwRuntimeError()

void votca::tools::throwRuntimeError ( std::string  message)
inline

Definition at line 410 of file property.h.

◆ ToolsVersionStr()

const std::string & votca::tools::ToolsVersionStr ( )

Definition at line 36 of file version.cc.

◆ TXT()

PropertyIOManipulator votca::tools::TXT ( PropertyIOManipulator::TXT  )

◆ verticesShouldBeReversed_()

bool votca::tools::verticesShouldBeReversed_ ( vector< int > &  vertices)

This function will determine if it is necessary to reverse the order of a chain of vertices. E.g.

1 - 2 - 4 - 5

This chain will not need to be reversed because the end points have end point 1 smaller than 5

This chain will need to be reversed

4 - 1 - 8 - 2

Because 2 is smaller than 4

If the chain has the same end points the next two vertices will be compared

1 - 2 - 3 - 4 - 1 ^ ^ | |

The 2 is smaller than the 4 so there is no need to reverse the order.

4 - 9 - 8 - 6 - 4

In this case th 6 is smaller than the 9 so the order will be reversed.

Definition at line 83 of file reducededge.cc.

◆ wildcmp()

int votca::tools::wildcmp ( const char *  wild,
const char *  string 
)

Definition at line 23 of file tokenizer.cc.

◆ XML()

PropertyIOManipulator votca::tools::XML ( PropertyIOManipulator::XML  )

Variable Documentation

◆ DEFAULT_COLORS

Color< csDefault > votca::tools::DEFAULT_COLORS

Definition at line 23 of file colors.cc.

◆ HLP

PropertyIOManipulator votca::tools::HLP(PropertyIOManipulator::HLP)

◆ TEX

PropertyIOManipulator votca::tools::TEX(PropertyIOManipulator::TEX)

◆ TXT

PropertyIOManipulator votca::tools::TXT(PropertyIOManipulator::TXT)

◆ version_str [1/2]

const std::string votca::tools::version_str
static
Initial value:
=
"VERSION NOT SET (compiled " __DATE__ ", " __TIME__ ")"

Definition at line 24 of file version_nb.cc.

◆ version_str [2/2]

const std::string votca::tools::version_str
static
Initial value:
= std::string(TOOLS_VERSION) + " " +
gitversion +
" (compiled " __DATE__ ", " __TIME__ ")"

Definition at line 32 of file version.cc.

◆ XML

PropertyIOManipulator votca::tools::XML(PropertyIOManipulator::XML)