#include <arcane/utils/Real3Proxy.h>
Public Member Functions | |
| Real3Proxy (Real3 &value, const MemoryAccessInfo &info) | |
| Constructs the triplet (ax,ay,az). | |
| Real3Proxy (const Real3Proxy &f) | |
| Constructs a triplet identical to f. | |
| Real3 | operator= (const Real3Proxy f) |
| Real3 | operator= (Real3 f) |
| Real3 | operator= (Real v) |
| Assigns the triplet (v,v,v) to the instance. | |
| operator Real3 () const | |
| Real3 | copy () const |
| Returns a copy of the triplet. | |
| Real3Proxy & | reset () |
| Resets the triplet with default constructors. | |
| Real3Proxy & | assign (Real ax, Real ay, Real az) |
| Assigns the triplet (ax,ay,az) to the instance. | |
| Real3Proxy & | assign (Real3 f) |
| Copies the triplet f. | |
| bool | isNearlyZero () const |
| Compares the triplet with the zero triplet. | |
| Real | abs2 () const |
| Returns the square of the norm of the triplet \(x^2+y^2+z^2\). | |
| Real | abs () const |
| Returns the norm of the triplet \(\sqrt{x^2+y^2+z^2}\). | |
| std::istream & | assign (std::istream &i) |
| Reads a triplet from the stream i The triplet is read in the form of three values of type #value_type. | |
| std::ostream & | print (std::ostream &o) const |
| Writes the triplet to the stream o readable by an assign(). | |
| std::ostream & | printXyz (std::ostream &o) const |
| Writes the triplet to the stream o in the form (x,y,z). | |
| Real3Proxy & | add (Real3 b) |
| Adds b to the triplet. | |
| Real3Proxy & | sub (Real3 b) |
| Subtracts b from the triplet. | |
| Real3Proxy & | mul (Real3 b) |
| Multiplies each component of the triplet by the corresponding component of b. | |
| Real3Proxy & | div (Real3 b) |
| Divides each component of the triplet by the corresponding component of b. | |
| Real3Proxy & | addSame (Real b) |
| Adds b to each component of the triplet. | |
| Real3Proxy & | subSame (Real b) |
| Subtracts b from each component of the triplet. | |
| Real3Proxy & | mulSame (Real b) |
| Multiplies each component of the triplet by b. | |
| Real3Proxy & | divSame (Real b) |
| Divides each component of the triplet by b. | |
| Real3Proxy & | operator+= (Real3 b) |
| Adds b to the triplet. | |
| Real3Proxy & | operator-= (Real3 b) |
| Subtracts b from the triplet. | |
| Real3Proxy & | operator*= (Real3 b) |
| Multiplies each component of the triplet by the corresponding component of b. | |
| void | operator*= (Real b) |
| Multiplies each component of the triplet by the real number b. | |
| Real3Proxy & | operator/= (Real3 b) |
| Divides each component of the triplet by the corresponding component of b. | |
| void | operator/= (Real b) |
| Divides each component of the triplet by the real number b. | |
| Real3 | operator+ (Real3 b) const |
| Creates a triplet that equals this triplet added to b. | |
| Real3 | operator- (Real3 b) const |
| Creates a triplet that equals b subtracted from this triplet. | |
| Real3 | operator- () const |
| Creates a triplet opposite to the current triplet. | |
| Real3 | operator* (Real3 b) const |
| Creates a triplet that equals this triplet whose each component has been multiplied by the corresponding component of b. | |
| Real3 | operator/ (Real3 b) const |
| Creates a triplet that equals this triplet whose each component has been divided by the corresponding component of b. | |
| Real3Proxy & | normalize () |
| Normalizes the triplet. | |
| Real3 | getValue () const |
| Real3 & | getValueMutable () |
| Public Member Functions inherited from Arcane::Real3POD | |
| __host__ __device__ Real | operator[] (Integer i) const |
| __host__ __device__ Real | operator() (Integer i) const |
| __host__ __device__ Real & | operator[] (Integer i) |
| __host__ __device__ Real & | operator() (Integer i) |
| __host__ __device__ void | setComponent (Integer i, Real value) |
| Sets the i-th component to value. | |
Public Attributes | |
| RealProxy | x |
| first component of the triplet | |
| RealProxy | y |
| second component of the triplet | |
| RealProxy | z |
| third component of the triplet | |
| Public Attributes inherited from Arcane::Real3POD | |
| Real | x |
| first component of the triplet | |
| Real | y |
| second component of the triplet | |
| Real | z |
| third component of the triplet | |
Static Private Member Functions | |
| static bool | _eq (Real a, Real b) |
| Compares the values of a and b using the TypeEqualT comparator. | |
| static Real | _sqrt (Real a) |
| Returns the square root of a. | |
Private Attributes | |
| Real3 & | m_value |
| MemoryAccessInfo | m_info |
Friends | |
| bool | operator== (Real3Proxy a, Real3Proxy b) |
| Compares the triplet to b. | |
| bool | operator!= (Real3Proxy a, Real3Proxy b) |
| Compares two triplets. For the notion of equality, see operator==(). | |
Proxy for a Real3.
Definition at line 37 of file Real3Proxy.h.
|
inline |
Constructs the triplet (ax,ay,az).
Definition at line 43 of file Real3Proxy.h.
Referenced by add(), addSame(), assign(), assign(), div(), divSame(), mul(), mulSame(), normalize(), operator!=, operator*=(), operator+=(), operator-=(), operator/=(), operator==, Real3Proxy(), reset(), sub(), and subSame().
|
inline |
Constructs a triplet identical to f.
Definition at line 52 of file Real3Proxy.h.
References Real3Proxy(), x, y, and z.
Compares the values of a and b using the TypeEqualT comparator.
| true | if a and b are equal, |
| false | otherwise. |
Definition at line 363 of file Real3Proxy.h.
References Arcane::math::isEqual().
Referenced by operator==.
Returns the square root of a.
Definition at line 369 of file Real3Proxy.h.
References Arcane::math::sqrt().
Referenced by abs().
|
inline |
Returns the norm of the triplet \(\sqrt{x^2+y^2+z^2}\).
Definition at line 158 of file Real3Proxy.h.
References _sqrt(), and abs2().
Referenced by normalize().
|
inline |
|
inline |
Adds b to the triplet.
Definition at line 176 of file Real3Proxy.h.
References Real3Proxy(), Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
Referenced by operator+=().
|
inline |
Adds b to each component of the triplet.
Definition at line 212 of file Real3Proxy.h.
References Real3Proxy(), x, y, and z.
|
inline |
Assigns the triplet (ax,ay,az) to the instance.
Definition at line 114 of file Real3Proxy.h.
References Real3Proxy(), x, y, and z.
Referenced by assign(), and Arcane::Real3::operator>>().
|
inline |
Copies the triplet f.
Definition at line 123 of file Real3Proxy.h.
References Real3Proxy(), Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
| std::istream & Arcane::Real3Proxy::assign | ( | std::istream & | i | ) |
|
inline |
|
inline |
Divides each component of the triplet by the corresponding component of b.
Definition at line 203 of file Real3Proxy.h.
References Real3Proxy(), Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
Referenced by operator/=().
|
inline |
Divides each component of the triplet by b.
Definition at line 239 of file Real3Proxy.h.
References Real3Proxy(), x, y, and z.
Referenced by normalize().
|
inline |
Definition at line 345 of file Real3Proxy.h.
|
inline |
Definition at line 350 of file Real3Proxy.h.
|
inline |
Compares the triplet with the zero triplet.
In the case of an integral type #value_type, the triplet is zero if and only if each of its components is equal to 0.
For #value_type of the floating-point type (float, double or Real), the triplet is zero if and only if each of its components is less than a given epsilon. The value of the epsilon used is that of float_info<value_type>::nearlyEpsilon():
\[A=0 \Leftrightarrow |A.x|<\epsilon,|A.y|<\epsilon,|A.z|<\epsilon \]
| true | if the triplet is equal to the zero triplet, |
| false | otherwise. |
Definition at line 146 of file Real3Proxy.h.
|
inline |
Multiplies each component of the triplet by the corresponding component of b.
Definition at line 194 of file Real3Proxy.h.
References Real3Proxy(), Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
Referenced by operator*=().
|
inline |
Multiplies each component of the triplet by b.
Definition at line 230 of file Real3Proxy.h.
References Real3Proxy(), x, y, and z.
|
inline |
Normalizes the triplet.
If the triplet is non-zero, divides each component by the norm of the triplet (abs()), so that after calling this method, abs() equals 1. If the triplet is zero, does nothing.
Definition at line 303 of file Real3Proxy.h.
References abs(), divSame(), Arcane::math::isZero(), and Real3Proxy().
|
inline |
Definition at line 82 of file Real3Proxy.h.
Creates a triplet that equals this triplet whose each component has been multiplied by the corresponding component of b.
Definition at line 288 of file Real3Proxy.h.
References Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
|
inline |
Multiplies each component of the triplet by the real number b.
Definition at line 257 of file Real3Proxy.h.
|
inline |
Multiplies each component of the triplet by the corresponding component of b.
Definition at line 254 of file Real3Proxy.h.
References mul(), and Real3Proxy().
Creates a triplet that equals this triplet added to b.
Definition at line 276 of file Real3Proxy.h.
References Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
|
inline |
Adds b to the triplet.
Definition at line 248 of file Real3Proxy.h.
References add(), and Real3Proxy().
|
inline |
Creates a triplet opposite to the current triplet.
Definition at line 282 of file Real3Proxy.h.
Creates a triplet that equals b subtracted from this triplet.
Definition at line 279 of file Real3Proxy.h.
References Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
|
inline |
Subtracts b from the triplet.
Definition at line 251 of file Real3Proxy.h.
References Real3Proxy(), and sub().
Creates a triplet that equals this triplet whose each component has been divided by the corresponding component of b.
Definition at line 294 of file Real3Proxy.h.
References Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
|
inline |
Divides each component of the triplet by the real number b.
Definition at line 268 of file Real3Proxy.h.
|
inline |
Divides each component of the triplet by the corresponding component of b.
Definition at line 265 of file Real3Proxy.h.
References div(), and Real3Proxy().
|
inline |
Definition at line 59 of file Real3Proxy.h.
Assigns the triplet (v,v,v) to the instance.
Definition at line 75 of file Real3Proxy.h.
Definition at line 66 of file Real3Proxy.h.
| std::ostream & Arcane::Real3Proxy::print | ( | std::ostream & | o | ) | const |
| std::ostream & Arcane::Real3Proxy::printXyz | ( | std::ostream & | o | ) | const |
Writes the triplet to the stream o in the form (x,y,z).
Definition at line 80 of file Real3.cc.
Referenced by Arcane::Real3::operator<<().
|
inline |
Resets the triplet with default constructors.
Definition at line 107 of file Real3Proxy.h.
References Real3Proxy(), x, y, and z.
|
inline |
Subtracts b from the triplet.
Definition at line 185 of file Real3Proxy.h.
References Real3Proxy(), Arcane::Real3POD::x, x, Arcane::Real3POD::y, y, Arcane::Real3POD::z, and z.
Referenced by operator-=().
|
inline |
Subtracts b from each component of the triplet.
Definition at line 221 of file Real3Proxy.h.
References Real3Proxy(), x, y, and z.
|
friend |
Compares two triplets. For the notion of equality, see operator==().
| true | if the two triplets are different, |
| false | otherwise. |
Definition at line 338 of file Real3Proxy.h.
References Real3Proxy().
|
friend |
Compares the triplet to b.
In the case of an integral type #value_type, two triplets are equal if and only if each of their components are strictly equal.
For #value_type of the floating-point type (float, double or Real), two triplets are identical if and only if the absolute value of the difference between each of their corresponding components is less than a given epsilon. The value of the epsilon used is that of float_info<value_type>::nearlyEpsilon():
\[A=B \Leftrightarrow |A.x-B.x|<\epsilon,|A.y-B.y|<\epsilon,|A.z-B.z|<\epsilon \]
| true | if the two triplets are equal, |
| false | otherwise. |
Definition at line 327 of file Real3Proxy.h.
References _eq(), Real3Proxy(), x, y, and z.
|
private |
Definition at line 99 of file Real3Proxy.h.
|
private |
Definition at line 98 of file Real3Proxy.h.
| RealProxy Arcane::Real3Proxy::x |
first component of the triplet
Definition at line 92 of file Real3Proxy.h.
Referenced by abs2(), add(), addSame(), assign(), assign(), copy(), div(), divSame(), isNearlyZero(), mul(), mulSame(), Arcane::operator*(), Arcane::operator*(), operator*(), operator*=(), operator+(), operator-(), operator-(), Arcane::operator/(), operator/(), operator/=(), operator=(), operator==, Real3Proxy(), Real3Proxy(), reset(), sub(), and subSame().
| RealProxy Arcane::Real3Proxy::y |
second component of the triplet
Definition at line 93 of file Real3Proxy.h.
Referenced by abs2(), add(), addSame(), assign(), assign(), copy(), div(), divSame(), isNearlyZero(), mul(), mulSame(), Arcane::operator*(), Arcane::operator*(), operator*(), operator*=(), operator+(), operator-(), operator-(), Arcane::operator/(), operator/(), operator/=(), operator=(), operator==, Real3Proxy(), Real3Proxy(), reset(), sub(), and subSame().
| RealProxy Arcane::Real3Proxy::z |
third component of the triplet
Definition at line 94 of file Real3Proxy.h.
Referenced by abs2(), add(), addSame(), assign(), assign(), copy(), div(), divSame(), isNearlyZero(), mul(), mulSame(), Arcane::operator*(), Arcane::operator*(), operator*(), operator*=(), operator+(), operator-(), operator-(), Arcane::operator/(), operator/(), operator/=(), operator=(), operator==, Real3Proxy(), Real3Proxy(), reset(), sub(), and subSame().