Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions
vec_functions.h File Reference

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

#include "ct_defs.h"
#include "utilities.h"
#include <functional>
#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

 Cantera
 Namespace for the Cantera kernel.
 

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

Detailed Description

Templates for operations on vector-like objects.

Definition in file vec_functions.h.