Openholo  v4.0
Open Source Digital Holographic Library
oph::vec4 Struct Reference

structure for 4-dimensional Real type vector and its arithmetic. More...

#include <vec.h>

Public Member Functions

 vec4 ()
 
 vec4 (Real a)
 
 vec4 (Real v_1, Real v_2, Real v_3, Real v_4)
 
 vec4 (const ivec4 &a)
 
 vec4 (const vec4 &a)
 
vec4operator= (const vec4 &a)
 
Realoperator[] (int i)
 
const Realoperator[] (int i) const
 
Realoperator() (int i)
 
const Realoperator() (int i) const
 
bool is_zero () const
 
bool is_tiny (Real tiny_tol=epsilon) const
 
bool unit ()
 
Real length () const
 

Public Attributes

Real v [4]
 

Static Public Attributes

static const int n = 4
 

Detailed Description

structure for 4-dimensional Real type vector and its arithmetic.

Definition at line 864 of file vec.h.

Constructor & Destructor Documentation

◆ vec4() [1/5]

oph::vec4::vec4 ( )
inline

Definition at line 868 of file vec.h.

◆ vec4() [2/5]

oph::vec4::vec4 ( Real  a)
inline

Definition at line 869 of file vec.h.

◆ vec4() [3/5]

oph::vec4::vec4 ( Real  v_1,
Real  v_2,
Real  v_3,
Real  v_4 
)
inline

Definition at line 870 of file vec.h.

◆ vec4() [4/5]

oph::vec4::vec4 ( const ivec4 a)
inline

Definition at line 871 of file vec.h.

◆ vec4() [5/5]

oph::vec4::vec4 ( const vec4 a)
inline

Definition at line 872 of file vec.h.

Member Function Documentation

◆ is_tiny()

bool oph::vec4::is_tiny ( Real  tiny_tol = epsilon) const
inline

Definition at line 881 of file vec.h.

◆ is_zero()

bool oph::vec4::is_zero ( ) const
inline

Definition at line 880 of file vec.h.

◆ length()

Real oph::vec4::length ( ) const

Definition at line 398 of file vec.cpp.

◆ operator()() [1/2]

Real& oph::vec4::operator() ( int  i)
inline

Definition at line 877 of file vec.h.

◆ operator()() [2/2]

const Real& oph::vec4::operator() ( int  i) const
inline

Definition at line 878 of file vec.h.

◆ operator=()

vec4& oph::vec4::operator= ( const vec4 a)
inline

Definition at line 874 of file vec.h.

◆ operator[]() [1/2]

Real& oph::vec4::operator[] ( int  i)
inline

Definition at line 875 of file vec.h.

◆ operator[]() [2/2]

const Real& oph::vec4::operator[] ( int  i) const
inline

Definition at line 876 of file vec.h.

◆ unit()

bool oph::vec4::unit ( )

Definition at line 389 of file vec.cpp.

Member Data Documentation

◆ n

const int oph::vec4::n = 4
static

Definition at line 866 of file vec.h.

◆ v

Real oph::vec4::v[4]

Definition at line 865 of file vec.h.


The documentation for this struct was generated from the following files: