scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
coordinates_3dr.hpp File Reference
#include "../meca_number/angle.hpp"
#include "./coordinates_3d.hpp"
#include "../units/base_units.hpp"
#include <iostream>
#include <string>
#include <vector>
Include dependency graph for coordinates_3dr.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  scifir::coordinates_3dr< T >
 
class  scifir::coordinates_3dr< float >
 

Namespaces

namespace  scifir
 The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
 

Functions

template<typename T >
string scifir::to_string (const coordinates_3dr< T > &x)
 
string scifir::to_string (const coordinates_3dr< float > &x)
 
template<typename T , typename U >
T scifir::distance (const coordinates_3dr< T > &x, const coordinates_3dr< U > &y)
 
float scifir::distance (const coordinates_3dr< float > &x, const coordinates_3dr< float > &y)
 
template<typename T , typename U >
T scifir::distance (const coordinates_3dr< T > &x, const coordinates_3d< U > &y)
 
float scifir::distance (const coordinates_3dr< float > &x, const coordinates_3d< float > &y)
 
template<typename T , typename U >
T scifir::distance (const coordinates_3d< T > &x, const coordinates_3dr< U > &y)
 
float scifir::distance (const coordinates_3d< float > &x, const coordinates_3dr< float > &y)
 
template<typename T , typename U >
bool operator== (const scifir::coordinates_3dr< T > &x, const scifir::coordinates_3dr< U > &y)
 
template<typename T , typename U >
bool operator!= (const scifir::coordinates_3dr< T > &x, const scifir::coordinates_3dr< U > &y)
 
template<typename T , typename U >
bool operator== (const scifir::coordinates_3dr< T > &x, const scifir::coordinates_3d< U > &y)
 
template<typename T , typename U >
bool operator!= (const scifir::coordinates_3dr< T > &x, const scifir::coordinates_3d< U > &y)
 
template<typename T , typename U >
bool operator== (const scifir::coordinates_3d< T > &x, const scifir::coordinates_3dr< U > &y)
 
template<typename T , typename U >
bool operator!= (const scifir::coordinates_3d< T > &x, const scifir::coordinates_3dr< U > &y)
 
template<typename T >
bool operator== (const scifir::coordinates_3dr< T > &x, const string &init_coordinates_3dr)
 
template<typename T >
bool operator!= (const scifir::coordinates_3dr< T > &x, const string &init_coordinates_3dr)
 
template<typename T >
bool operator== (const string &init_coordinates_3dr, const scifir::coordinates_3dr< T > &x)
 
template<typename T >
bool operator!= (const string &init_coordinates_3dr, const scifir::coordinates_3dr< T > &x)
 
template<typename T >
void operator+= (string &x, const scifir::coordinates_3dr< T > &y)
 
template<typename T >
string operator+ (const string &x, const scifir::coordinates_3dr< T > &y)
 
template<typename T >
string operator+ (const scifir::coordinates_3dr< T > &x, const string &y)
 
template<typename T >
ostream & operator<< (ostream &os, const scifir::coordinates_3dr< T > &x)
 
ostream & operator<< (ostream &os, const scifir::coordinates_3dr< float > &x)
 
template<typename T >
istream & operator>> (istream &is, scifir::coordinates_3dr< T > &x)
 

Function Documentation

◆ operator!=() [1/5]

template<typename T , typename U >
bool operator!= ( const scifir::coordinates_3d< T > &  x,
const scifir::coordinates_3dr< U > &  y 
)

Definition at line 984 of file coordinates_3dr.hpp.

985{
986 return !(x == y);
987}

◆ operator!=() [2/5]

template<typename T , typename U >
bool operator!= ( const scifir::coordinates_3dr< T > &  x,
const scifir::coordinates_3d< U > &  y 
)

Definition at line 965 of file coordinates_3dr.hpp.

966{
967 return !(x == y);
968}

◆ operator!=() [3/5]

template<typename T , typename U >
bool operator!= ( const scifir::coordinates_3dr< T > &  x,
const scifir::coordinates_3dr< U > &  y 
)

Definition at line 946 of file coordinates_3dr.hpp.

947{
948 return !(x == y);
949}

◆ operator!=() [4/5]

template<typename T >
bool operator!= ( const scifir::coordinates_3dr< T > &  x,
const string &  init_coordinates_3dr 
)

Definition at line 997 of file coordinates_3dr.hpp.

998{
999 return !(x == init_coordinates_3dr);
1000}

◆ operator!=() [5/5]

template<typename T >
bool operator!= ( const string &  init_coordinates_3dr,
const scifir::coordinates_3dr< T > &  x 
)

Definition at line 1010 of file coordinates_3dr.hpp.

1011{
1012 return !(init_coordinates_3dr == x);
1013}

◆ operator+() [1/2]

template<typename T >
string operator+ ( const scifir::coordinates_3dr< T > &  x,
const string &  y 
)

Definition at line 1028 of file coordinates_3dr.hpp.

1029{
1030 return to_string(x) + y;
1031}
string to_string(const aid &x)
Creates a string representation of aid, it's for aid equivalent to the display() function of aid.
Definition aid.cpp:582

◆ operator+() [2/2]

template<typename T >
string operator+ ( const string &  x,
const scifir::coordinates_3dr< T > &  y 
)

Definition at line 1022 of file coordinates_3dr.hpp.

1023{
1024 return x + to_string(y);
1025}

◆ operator+=()

template<typename T >
void operator+= ( string &  x,
const scifir::coordinates_3dr< T > &  y 
)

Definition at line 1016 of file coordinates_3dr.hpp.

1017{
1018 x += to_string(y);
1019}

◆ operator<<() [1/2]

ostream & operator<< ( ostream &  os,
const scifir::coordinates_3dr< float > &  x 
)

Definition at line 28 of file coordinates_3dr.cpp.

29{
30 return os << scifir::to_string(x);
31}

◆ operator<<() [2/2]

template<typename T >
ostream & operator<< ( ostream &  os,
const scifir::coordinates_3dr< T > &  x 
)

Definition at line 1034 of file coordinates_3dr.hpp.

1035{
1036 return os << to_string(x);
1037}

◆ operator==() [1/5]

template<typename T , typename U >
bool operator== ( const scifir::coordinates_3d< T > &  x,
const scifir::coordinates_3dr< U > &  y 
)

Definition at line 971 of file coordinates_3dr.hpp.

972{
973 if (x.x == y.x and x.y == y.y and x.z == y.z)
974 {
975 return true;
976 }
977 else
978 {
979 return false;
980 }
981}

◆ operator==() [2/5]

template<typename T , typename U >
bool operator== ( const scifir::coordinates_3dr< T > &  x,
const scifir::coordinates_3d< U > &  y 
)

Definition at line 952 of file coordinates_3dr.hpp.

953{
954 if (x.x == y.x and x.y == y.y and x.z == y.z)
955 {
956 return true;
957 }
958 else
959 {
960 return false;
961 }
962}

◆ operator==() [3/5]

template<typename T , typename U >
bool operator== ( const scifir::coordinates_3dr< T > &  x,
const scifir::coordinates_3dr< U > &  y 
)

Definition at line 933 of file coordinates_3dr.hpp.

934{
935 if (x.x == y.x and x.y == y.y and x.z == y.z and x.theta == y.theta and x.phi == y.phi)
936 {
937 return true;
938 }
939 else
940 {
941 return false;
942 }
943}

◆ operator==() [4/5]

template<typename T >
bool operator== ( const scifir::coordinates_3dr< T > &  x,
const string &  init_coordinates_3dr 
)

Definition at line 990 of file coordinates_3dr.hpp.

991{
992 scifir::coordinates_3dr<T> y(init_coordinates_3dr);
993 return (x == y);
994}

◆ operator==() [5/5]

template<typename T >
bool operator== ( const string &  init_coordinates_3dr,
const scifir::coordinates_3dr< T > &  x 
)

Definition at line 1003 of file coordinates_3dr.hpp.

1004{
1005 scifir::coordinates_3dr<T> y(init_coordinates_3dr);
1006 return (x == y);
1007}

◆ operator>>()

template<typename T >
istream & operator>> ( istream &  is,
scifir::coordinates_3dr< T > &  x 
)

Definition at line 1042 of file coordinates_3dr.hpp.

1043{
1044 char a[256];
1045 is.getline(a, 256);
1046 string b(a);
1047 boost::trim(b);
1049 return is;
1050}