Cantera  2.0
Namespaces | Functions
vec_functions.h File Reference

Templates for operations on vector-like objects. More...

#include "ct_defs.h"
#include "utilities.h"
#include <numeric>
#include <functional>
#include <algorithm>
#include <iostream>
#include <cstring>
Include dependency graph for vec_functions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Cantera
 Provides class Nucleus.
 

Functions

template<class T >
void copyn (size_t n, const T &x, T &y)
 Templated function that copies the first n entries from x to y.
 
template<class T >
void divide_each (T &x, const T &y)
 Divide each element of x by the corresponding element of y.
 
template<class T >
void multiply_each (T &x, const T &y)
 Multiply each element of x by the corresponding element of y.
 
template<class T , class S >
void scale (T &x, S scale_factor)
 Multiply each element of x by scale_factor.
 
template<class T >
doublereal dot_product (const T &x, const T &y)
 Return the templated dot product of two objects.
 
template<class T >
doublereal dot_ratio (const T &x, const T &y)
 Returns the templated dot ratio of two objects.
 
template<class T >
void add_each (T &x, const T &y)
 Returns a templated addition operation of two objects.
 
template<class InputIter , class S >
doublereal _dot_ratio (InputIter x_begin, InputIter x_end, InputIter y_begin, S start_value)
 Templated dot ratio class.
 
template<class T >
absmax (const std::vector< T > &v)
 Finds the entry in a vector with maximum absolute value, and return this value.
 
template<class T >
std::ostream & operator<< (std::ostream &os, const std::vector< T > &v)
 Write a vector to a stream.
 

Detailed Description

Templates for operations on vector-like objects.

Definition in file vec_functions.h.