Generated on Sat Feb 7 2015 02:01:21 for Gecode by doxygen 1.8.9.1
task-view.hpp
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Christian Schulte <schulte@gecode.org>
5  * Guido Tack <tack@gecode.org>
6  *
7  * Copyright:
8  * Christian Schulte, 2009
9  * Guido Tack, 2010
10  *
11  * Last modified:
12  * $Date: 2011-05-25 16:56:41 +0200 (Wed, 25 May 2011) $ by $Author: schulte $
13  * $Revision: 12022 $
14  *
15  * This file is part of Gecode, the generic constraint
16  * development environment:
17  * http://www.gecode.org
18  *
19  * Permission is hereby granted, free of charge, to any person obtaining
20  * a copy of this software and associated documentation files (the
21  * "Software"), to deal in the Software without restriction, including
22  * without limitation the rights to use, copy, modify, merge, publish,
23  * distribute, sublicense, and/or sell copies of the Software, and to
24  * permit persons to whom the Software is furnished to do so, subject to
25  * the following conditions:
26  *
27  * The above copyright notice and this permission notice shall be
28  * included in all copies or substantial portions of the Software.
29  *
30  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
33  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
34  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
35  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
36  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37  *
38  */
39 
40 namespace Gecode { namespace Int { namespace Cumulative {
41 
42  template<class Char, class Traits>
43  std::basic_ostream<Char,Traits>&
44  operator <<(std::basic_ostream<Char,Traits>& os, const ManFixPTaskBwd& t) {
45  std::basic_ostringstream<Char,Traits> s;
46  s.copyfmt(os); s.width(0);
47  s << t.est() << ":[" << t.pmin() << ',' << t.c() << "]:" << t.lct();
48  return os << s.str();
49  }
50 
51  template<class Char, class Traits>
52  std::basic_ostream<Char,Traits>&
53  operator <<(std::basic_ostream<Char,Traits>& os,
54  const ManFixPSETaskBwd& t) {
55  std::basic_ostringstream<Char,Traits> s;
56  s.copyfmt(os); s.width(0);
57  s << t.est() << ":[" << t.pmin() << ',' << t.c() << "]:" << t.lct();
58  return os << s.str();
59  }
60 
61  template<class Char, class Traits>
62  std::basic_ostream<Char,Traits>&
63  operator <<(std::basic_ostream<Char,Traits>& os, const OptFixPTaskBwd& t) {
64  std::basic_ostringstream<Char,Traits> s;
65  s.copyfmt(os); s.width(0);
66  s << t.est() << ":[" << t.pmin() << ',' << t.c() << "]:" << t.lct() << ':'
67  << (t.mandatory() ? '1' : (t.optional() ? '?' : '0'));
68  return os << s.str();
69  }
70 
71  template<class Char, class Traits>
72  std::basic_ostream<Char,Traits>&
73  operator <<(std::basic_ostream<Char,Traits>& os,
74  const OptFixPSETaskBwd& t) {
75  std::basic_ostringstream<Char,Traits> s;
76  s.copyfmt(os); s.width(0);
77  s << t.est() << ":[" << t.pmin() << ',' << t.c() << "]:" << t.lct() << ':'
78  << (t.mandatory() ? '1' : (t.optional() ? '?' : '0'));
79  return os << s.str();
80  }
81 
82 }}}
83 
84 // STATISTICS: int-var
NodeType t
Type of node.
Definition: bool-expr.cpp:234
Task mapper: turns a task view into its dual.
Definition: task.hh:104
Gecode toplevel namespace