/Users/bernard/b20/bsoft/include/Vector3.h(3)

NAME
/Users/bernard/b20/bsoft/include/Vector3.h - Class for 3-value vectors.

SYNOPSIS

#include <iostream>
#include <cmath>
#include <vector>
#include 'math_util.h'
#include 'utilities.h'

  Classes
class Vector3< Type >
Vector class for 3-value vectors used in 3D space. The internal variables are an array of 3 numbers.

  Functions
template<typename Type > ostream & operator<< (ostream &output, Vector3< Type > vec)
template<typename Type > ostream & operator<< (ostream &output, vector< Type > vec)
template<typename T > vector< T > operator- (vector< T > v1)
template<typename T1 , typename T2 > vector< T1 > operator+ (vector< T1 > v1, vector< T2 > v2)
template<typename T1 , typename T2 > vector< T1 > operator+ (vector< T1 > v1, T2 v2)
template<typename T1 , typename T2 > void operator+= (vector< T1 > &v1, vector< T2 > v2)
template<typename T1 , typename T2 > void operator+= (vector< T1 > &v1, T2 v2)
template<typename T1 , typename T2 > vector< T1 > operator- (vector< T1 > v1, vector< T2 > v2)
template<typename T1 , typename T2 > vector< T1 > operator- (vector< T1 > v1, Vector3< T2 > &v2)
template<typename T1 , typename T2 > vector< T1 > operator- (vector< T1 > v1, T2 v2)
template<typename T1 , typename T2 > void operator-= (vector< T1 > &v1, vector< T2 > v2)
template<typename T1 , typename T2 > void operator-= (vector< T1 > &v1, T2 v2)
template<typename T1 , typename T2 > vector< T1 > operator * (vector< T1 > v1, T2 v2)
template<typename T1 , typename T2 > void operator *= (vector< T1 > &v1, T2 v2)
template<typename T1 , typename T2 > vector< T1 > operator * (vector< T1 > v1, vector< T2 > v2)
template<typename T1 , typename T2 > void operator *= (vector< T1 > &v1, vector< T2 > v2)
template<typename T1 , typename T2 > vector< T1 > operator/ (vector< T1 > v1, T2 v2)
template<typename T1 , typename T2 > void operator/= (vector< T1 > &v1, T2 v2)
template<typename T1 , typename T2 > vector< T1 > operator/ (vector< T1 > v1, vector< T2 > v2)
template<typename T1 , typename T2 > void operator/= (vector< T1 > v1, vector< T2 > v2)
template<typename T > double length2 (vector< T > v)
template<typename T > double length (vector< T > v)
template<typename T1 , typename T2 > double distance (vector< T1 > &v1, vector< T2 > &v2)
template<typename T > T volume (vector< T > v)
template<typename T > vector< T > absolute (vector< T > v1)
template<typename T1 , typename T2 > vector< T1 > vecmin (vector< T1 > v1, vector< T2 > v2)
template<typename T1 , typename T2 > vector< T1 > vecmin (vector< T1 > v1, T2 v2)
template<typename T1 , typename T2 > vector< T1 > vecmax (vector< T1 > v1, vector< T2 > v2)
template<typename T1 , typename T2 > vector< T1 > vecmax (vector< T1 > v1, T2 v2)
template<typename T1 , typename T2 > double scalar (vector< T1 > &v1, vector< T2 > &v2)
template<typename T1 , typename T2 > vector< T1 > cross (vector< T1 > &v1, vector< T2 > &v2)
template<typename Type > Vector3< Type > operator/ (double d, Vector3< Type > vec)
Divides a value by each of the elements of a 3-value vector.
template<typename Type > Vector3< Type > vector3_scalar_range (Vector3< Type > vec, double min, double max)
template<typename T1 , typename T2 > Vector3< T1 > vector3_origin_to_shift (Vector3< T1 > origin, Vector3< T2 > size)
template<typename T1 , typename T2 > Vector3< T1 > vector3_set_PBC (Vector3< T1 > coord, Vector3< T2 > box)
template<typename T1 , typename T2 > Vector3< T1 > vector3_difference_PBC (Vector3< T1 > &v1, Vector3< T1 > &v2, Vector3< T2 > &box)

Detailed Description

Class for 3-value vectors.

Author:
    Bernard Heymann

Date:
    Created: 20000501

    Modified: 20190708

Definition in file Vector3.h.

Function Documentation

  template<typename T > vector<T> absolute (vector< T > v1) [inline]

Definition at line 556 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> cross (vector< T1 > & v1, vector< T2 > & v2) [inline]

Definition at line 622 of file Vector3.h.

  template<typename T1 , typename T2 > double distance (vector< T1 > & v1, vector< T2 > & v2) [inline]

Definition at line 536 of file Vector3.h.

  template<typename T > double length (vector< T > v) [inline]

Definition at line 528 of file Vector3.h.

  template<typename T > double length2 (vector< T > v) [inline]

Definition at line 517 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator * (vector< T1 > v1, T2 v2) [inline]

Definition at line 445 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator * (vector< T1 > v1, vector< T2 > v2) [inline]

Definition at line 463 of file Vector3.h.

  template<typename T1 , typename T2 > void operator *= (vector< T1 > & v1, T2 v2) [inline]

Definition at line 456 of file Vector3.h.

  template<typename T1 , typename T2 > void operator *= (vector< T1 > & v1, vector< T2 > v2) [inline]

Definition at line 474 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator+ (vector< T1 > v1, vector< T2 > v2) [inline]

Definition at line 363 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator+ (vector< T1 > v1, T2 v2) [inline]

Definition at line 374 of file Vector3.h.

  template<typename T1 , typename T2 > void operator+= (vector< T1 > & v1, vector< T2 > v2) [inline]

Definition at line 385 of file Vector3.h.

  template<typename T1 , typename T2 > void operator+= (vector< T1 > & v1, T2 v2) [inline]

Definition at line 392 of file Vector3.h.

  template<typename T > vector<T> operator- (vector< T > v1) [inline]

Definition at line 352 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator- (vector< T1 > v1, vector< T2 > v2) [inline]

Definition at line 400 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator- (vector< T1 > v1, Vector3< T2 > & v2) [inline]

Definition at line 411 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator- (vector< T1 > v1, T2 v2) [inline]

Definition at line 420 of file Vector3.h.

  template<typename T1 , typename T2 > void operator-= (vector< T1 > & v1, vector< T2 > v2) [inline]

Definition at line 431 of file Vector3.h.

  template<typename T1 , typename T2 > void operator-= (vector< T1 > & v1, T2 v2) [inline]

Definition at line 438 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator/ (vector< T1 > v1, T2 v2) [inline]

Definition at line 481 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> operator/ (vector< T1 > v1, vector< T2 > v2) [inline]

Definition at line 499 of file Vector3.h.

  template<typename Type > Vector3<Type> operator/ (double d, Vector3< Type > vec) [inline]

Divides a value by each of the elements of a 3-value vector.

Parameters:
    d value to be divided.
    vec 3-value vector.

Returns:
    Vector3<Type> new 3-value vector.

    All elements of the vector must be non-zero.

Definition at line 643 of file Vector3.h.

  template<typename T1 , typename T2 > void operator/= (vector< T1 > & v1, T2 v2) [inline]

Definition at line 492 of file Vector3.h.

  template<typename T1 , typename T2 > void operator/= (vector< T1 > v1, vector< T2 > v2) [inline]

Definition at line 510 of file Vector3.h.

  template<typename Type > ostream& operator<< (ostream & output, Vector3< Type > vec)

Definition at line 290 of file Vector3.h.

  template<typename Type > ostream& operator<< (ostream & output, vector< Type > vec)

Definition at line 297 of file Vector3.h.

  template<typename T1 , typename T2 > double scalar (vector< T1 > & v1, vector< T2 > & v2) [inline]

Definition at line 611 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> vecmax (vector< T1 > v1, vector< T2 > v2) [inline]

Definition at line 589 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> vecmax (vector< T1 > v1, T2 v2) [inline]

Definition at line 600 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> vecmin (vector< T1 > v1, vector< T2 > v2) [inline]

Definition at line 567 of file Vector3.h.

  template<typename T1 , typename T2 > vector<T1> vecmin (vector< T1 > v1, T2 v2) [inline]

Definition at line 578 of file Vector3.h.

  template<typename T1 , typename T2 > Vector3<T1> vector3_difference_PBC (Vector3< T1 > & v1, Vector3< T1 > & v2, Vector3< T2 > & box) [inline]

Definition at line 695 of file Vector3.h.

  template<typename T1 , typename T2 > Vector3<T1> vector3_origin_to_shift (Vector3< T1 > origin, Vector3< T2 > size)

Definition at line 667 of file Vector3.h.

  template<typename Type > Vector3<Type> vector3_scalar_range (Vector3< Type > vec, double min, double max) [inline]

Definition at line 652 of file Vector3.h.

  template<typename T1 , typename T2 > Vector3<T1> vector3_set_PBC (Vector3< T1 > coord, Vector3< T2 > box) [inline]

Definition at line 682 of file Vector3.h.

  template<typename T > T volume (vector< T > v) [inline]

Definition at line 545 of file Vector3.h.

Author

Generated automatically by Doxygen for Bsoft from the source code.