Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Real2x2.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Real2x2.cc (C) 2000-2023 */
9/* */
10/* Matrice 2x2 de 'Real'. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArcanePrecomp.h"
15#include "arcane/utils/Iostream.h"
16#include "arcane/utils/Real2x2.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arcane
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27std::istream& Real2x2::
28assign(std::istream& i)
29{
30 i >> x >> ws >> y;
31 return i;
32}
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37std::ostream& Real2x2::
38print(std::ostream& o) const
39{
40 o << x << ' ' << y;
41 return o;
42}
43
44/*---------------------------------------------------------------------------*/
45/*---------------------------------------------------------------------------*/
46
47std::ostream& Real2x2::
48printXy(std::ostream& o) const
49{
50 o << '(' << x << ',' << y << ')';
51 return o;
52}
53
54/*---------------------------------------------------------------------------*/
55/*---------------------------------------------------------------------------*/
56
57} // namespace Arcane
58
59/*---------------------------------------------------------------------------*/
60/*---------------------------------------------------------------------------*/
std::ostream & print(std::ostream &o) const
Ecrit le couple sur le flot o lisible par un assign()
Definition Real2x2.cc:38
Real2 x
Première composante.
Definition Real2x2.h:98
std::ostream & printXy(std::ostream &o) const
Ecrit le couple sur le flot o sous la forme (x,y,z)
Definition Real2x2.cc:48
Real2 y
Deuxième composante.
Definition Real2x2.h:99
constexpr ARCCORE_HOST_DEVICE Real2x2 & assign(Real2 ax, Real2 ay)
Affecte à l'instance le couple (ax,ay,az)
Definition Real2x2.h:129
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-