22 #include "libmesh/type_vector.h"
27 #include <type_traits>
31 "Someone made TypeVector non-TriviallyCopyable");
32 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
34 "Someone made TypeVector non-TriviallyCopyable");
51 os <<
"x=" << (*this)(0);
57 << std::setw(8) << (*this)(0) <<
", "
58 << std::setw(8) << (*this)(1) <<
")";
64 << std::setw(8) << (*this)(0) <<
", "
65 << std::setw(8) << (*this)(1) <<
", "
66 << std::setw(8) << (*this)(2) <<
")";
76 const bool newline)
const
78 os << std::setiosflags(std::ios::showpoint)
92 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
94 if ((*
this)(i) < rhs(i))
96 if ((*
this)(i) > rhs(i))
103 template <
typename T>
106 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
108 if ((*
this)(i) < rhs(i))
110 if ((*
this)(i) > rhs(i))
118 template <
typename T>
121 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
123 if ((*
this)(i) > rhs(i))
125 if ((*
this)(i) < rhs(i))
132 template <
typename T>
135 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
137 if ((*
this)(i) > rhs(i))
139 if ((*
this)(i) < rhs(i))
146 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
150 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
152 if ((*
this)(i).
real() < rhs(i).
real())
154 if ((*
this)(i).
real() > rhs(i).
real())
156 if ((*
this)(i).
imag() < rhs(i).
imag())
158 if ((*
this)(i).
imag() > rhs(i).
imag())
169 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
171 if ((*
this)(i).
real() < rhs(i).
real())
173 if ((*
this)(i).
real() > rhs(i).
real())
175 if ((*
this)(i).
imag() < rhs(i).
imag())
177 if ((*
this)(i).
imag() > rhs(i).
imag())
188 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
190 if ((*
this)(i).
real() > rhs(i).
real())
192 if ((*
this)(i).
real() < rhs(i).
real())
194 if ((*
this)(i).
imag() > rhs(i).
imag())
196 if ((*
this)(i).
imag() < rhs(i).
imag())
207 for (
unsigned int i=0; i<LIBMESH_DIM; i++)
209 if ((*
this)(i).
real() > rhs(i).
real())
211 if ((*
this)(i).
real() < rhs(i).
real())
213 if ((*
this)(i).
imag() > rhs(i).
imag())
215 if ((*
this)(i).
imag() < rhs(i).
imag())
229 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
bool operator>=(const TypeVector< T > &rhs) const
判断该向量是否大于等于另一个向量。
boost::multiprecision::float128 real(const boost::multiprecision::float128 in)
bool operator>(const TypeVector< T > &rhs) const
判断该向量是否大于另一个向量。
void write_unformatted(std::ostream &out_stream, const bool newline=true) const
无格式输出到流 out。只是将向量的元素用空格分隔打印出来。 默认情况下,还会打印一个换行符,但可以通过 newline 参数来控制这个行为。
bool operator<=(const TypeVector< T > &rhs) const
判断该向量是否小于等于另一个向量。
void print(std::ostream &os=libMesh::out) const
格式化输出,默认输出到 libMesh::out 流。
该类定义了一个在 LIBMESH_DIM 维度空间中类型为 T 的向量。
bool operator<(const TypeVector< T > &rhs) const
判断该向量是否小于另一个向量。
boost::multiprecision::float128 imag(const boost::multiprecision::float128)