12#ifndef ARCANE_UTILS_REAL2X2PROXY_H
13#define ARCANE_UTILS_REAL2X2PROXY_H
17#include "arcane/utils/Real2x2.h"
18#include "arcane/utils/Real2Proxy.h"
57 const Real2x2Proxy& operator=(Real2x2 f)
109 operator const Real2x2&()
const
131 return x.isNearlyZero() &&
y.isNearlyZero();
261 m_info.setReadOrWrite();
272 static bool _eq(Real a, Real b)
274 return TypeEqualT<Real>::isEqual(a, b);
284 return a == b.getValue();
289 return a.getValue() == b;
294 return a.getValue() == b.getValue();
303 return a != b.getValue();
308 return a.getValue() != b;
313 return a.getValue() != b.getValue();
346 return Real2x2(vec.
x * sca, vec.
y * sca);
356 return Real2x2(vec.
x * sca, vec.
y * sca);
366 return Real2x2(vec.
x / sca, vec.
y / sca);
Class managing a 2-dimensional real vector.
RealProxy x
first component of the pair
Class managing a 2-dimensional real vector.
Real2x2 operator-(Real2x2 b) const
Creates a pair that equals b subtracted from this pair.
Real2x2Proxy & divSame(Real2 b)
Divides each component of the pair by b.
ostream & print(ostream &o) const
Writes the pair to the stream o readable by an assign().
Real2x2Proxy & add(Real2x2 b)
Adds b to the pair.
bool isNearlyZero() const
Compares the matrix with the zero matrix.
istream & operator>>(istream &i, Real2x2Proxy &t)
Reads the pair t from the stream o.
void operator*=(Real b)
Multiplies each component of the pair by the corresponding component of b.
Real2x2Proxy & assign(Real2x2Proxy f)
Copies the pair f.
Real2x2Proxy(const Real2x2Proxy &f)
Constructs a pair identical to f.
Real2x2Proxy & mulSame(Real2 b)
Multiplies each component of the pair by b.
Real2x2 operator-() const
Creates a tensor opposite to the current tensor.
Real2x2Proxy & operator+=(Real2x2 b)
Adds b to the pair.
Real2x2Proxy & subSame(Real2 b)
Subtracts b from each component of the pair.
Real2x2Proxy(Real2x2 &value, const MemoryAccessInfo &info)
Constructs the pair (ax,ay).
Real2x2 operator+(Real2x2 b) const
Creates a pair that equals this pair added to b.
Real2x2Proxy & addSame(Real2 b)
Adds b to each component of the pair.
const Real2x2Proxy & operator=(Real v)
Assigns the triplet (v,v,v) to the instance.
Real2x2Proxy & operator-=(Real2x2 b)
Subtracts b from the pair.
Real2x2Proxy & div(Real2x2 b)
Multiplies each component of the pair by the corresponding component of b.
const Real2x2 & getValue() const
Creates a pair that equals this pair whose each component has been multiplied by the corresponding co...
Real2Proxy x
First component.
istream & assign(istream &i)
Reads the matrix from the stream i The matrix is read in the form of three Real2s.
Real2x2Proxy & assign(Real2 ax, Real2 ay)
Assigns the triplet (ax,ay,az) to the instance.
Real2Proxy y
Second component.
Real2x2Proxy & reset()
Resets the pair using default constructors.
Real2x2Proxy & sub(Real2x2 b)
Subtracts b from the pair.
Real2x2 copy() const
Returns a copy of the pair.
ostream & printXy(ostream &o) const
Writes the pair to the stream o in the form (x,y,z).
void operator/=(Real b)
Divides each component of the pair by the corresponding component of b.
Class managing a 2x2 matrix of reals.
constexpr __host__ static __device__ Real2x2 null()
Constructs the zero matrix.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Real2 operator*(Real sca, const Real2Proxy &vec)
Multiplication by a scalar.
bool operator<(const Item &item1, const Item &item2)
Compare two entities.
double Real
Type representing a real number.
Real2 operator/(const Real2Proxy &vec, Real sca)
Division by a scalar.
std::ostream & operator<<(std::ostream &ostr, eItemKind item_kind)
Output operator for a stream.