xc
Variations.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. Pérez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //Variations.hxx
22 //Conjunto de las posibles variations de dos elementos
23 //(partial_safety_factors_fav y partial_safety_factors_desfav) tomados de n en n.
24 
25 #ifndef VARIATIONS_HXX
26 #define VARIATIONS_HXX
27 
28 #include "Variation.h"
29 
30 namespace cmb_acc{
31 
33 //
35 class Variations: public std::vector<Variation>
36  {
37  void print(std::ostream &os) const;
38  public:
39  static Variations first_combination(const Variation &v);
40  static Variations prod_cartesiano(const Variations &a,const Variations &b);
41 
42  Variations(const size_t &sz=0,const Variation &v=Variation());
43  friend std::ostream &operator<<(std::ostream &os,const Variations &vs);
44  };
45 
46  std::ostream &operator<<(std::ostream &os,const Variations &vs);
47 } //fin namespace nmb_acc.
48 
49 #endif
Routines to generate combinations of actions.
Conjunto de las posibles variations de dos elementos (partial_safety_factors_fav y partial_safety_fac...
Definition: Variations.h:35
Vector that stores the factors of the linear combination of actions.
Definition: Variation.h:36
static Variations prod_cartesiano(const Variations &a, const Variations &b)
Return el producto cartesiano de las variations que se pasan como parámetro.
Definition: Variations.cc:54
static Variations first_combination(const Variation &v)
Return the first combination.
Definition: Variations.cc:44
Variations(const size_t &sz=0, const Variation &v=Variation())
Constructor.
Definition: Variations.cc:27