/usr/share/doc/coinor-libflopc++-doc/html/MP__data_8hpp_source.html is in coinor-libflopc++-doc 1.0.6-3.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FLOPC++: MP_data.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">FLOPC++</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">MP_data.hpp</div> </div>
</div>
<div class="contents">
<a href="MP__data_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ******************** FlopCpp **********************************************</span>
<a name="l00002"></a>00002 <span class="comment">// File: MP_data.hpp</span>
<a name="l00003"></a>00003 <span class="comment">// $Id$</span>
<a name="l00004"></a>00004 <span class="comment">// Author: Tim Helge Hultberg (thh@mat.ua.pt)</span>
<a name="l00005"></a>00005 <span class="comment">// Copyright (C) 2003 Tim Helge Hultberg</span>
<a name="l00006"></a>00006 <span class="comment">// All Rights Reserved.</span>
<a name="l00007"></a>00007 <span class="comment">// ****************************************************************************</span>
<a name="l00008"></a>00008
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef _MP_data_hpp_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define _MP_data_hpp_</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include <vector></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="MP__index_8hpp.html">MP_index.hpp</a>"</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include "<a class="code" href="MP__set_8hpp.html">MP_set.hpp</a>"</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include "<a class="code" href="MP__constant_8hpp.html">MP_constant.hpp</a>"</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include "<a class="code" href="MP__boolean_8hpp.html">MP_boolean.hpp</a>"</span>
<a name="l00017"></a>00017
<a name="l00018"></a>00018 <span class="keyword">namespace </span>flopc {
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="keyword">class </span>MP_data;
<a name="l00021"></a>00021
<a name="l00027"></a><a class="code" href="classflopc_1_1DataRef.html">00027</a> <span class="keyword">class </span><a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1Constant__base.html" title="Base class for all "constant" types of data.">Constant_base</a>, <span class="keyword">public</span> <a class="code" href="classflopc_1_1Functor.html" title="Function object. Often used.">Functor</a> {
<a name="l00028"></a>00028 <span class="keyword">public</span>:
<a name="l00029"></a><a class="code" href="classflopc_1_1DataRef.html#a057bc052c946aed6c57b3eaef667baa4">00029</a> <a class="code" href="classflopc_1_1DataRef.html#a057bc052c946aed6c57b3eaef667baa4">DataRef</a>(<a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a>* d,
<a name="l00030"></a>00030 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& i1,
<a name="l00031"></a>00031 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& i2,
<a name="l00032"></a>00032 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& i3,
<a name="l00033"></a>00033 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& i4,
<a name="l00034"></a>00034 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& i5,
<a name="l00035"></a>00035 <span class="keywordtype">int</span> s = 0) :
<a name="l00036"></a>00036 <a class="code" href="classflopc_1_1DataRef.html#ad4f56e315a9aed8fa75fd22ac6cc6ee5">D</a>(d),<a class="code" href="classflopc_1_1DataRef.html#ab5bb7daf5c15c3d731ad8b8f44f4e7c9">I1</a>(i1),<a class="code" href="classflopc_1_1DataRef.html#a460818f97a14ff397ce8aa21b63246ec">I2</a>(i2),<a class="code" href="classflopc_1_1DataRef.html#ae2887af266c2e83e402b76d45deab650">I3</a>(i3),<a class="code" href="classflopc_1_1DataRef.html#a1d484e4fcd684ecce9a7e02c599fa249">I4</a>(i4),<a class="code" href="classflopc_1_1DataRef.html#a08e11631d807501d4491c856bf019baa">I5</a>(i5),<a class="code" href="classflopc_1_1DataRef.html#ada593bf73adab224647c0cfb8fc82e4d">C</a>(0),<a class="code" href="classflopc_1_1DataRef.html#a2ddcff9e00391d7b68f4ed67a9b2f8a7">stochastic</a>(s) {}
<a name="l00037"></a>00037
<a name="l00038"></a><a class="code" href="classflopc_1_1DataRef.html#a42b8b31366e9d8a964d0bd9b393f76b1">00038</a> <a class="code" href="classflopc_1_1DataRef.html#a42b8b31366e9d8a964d0bd9b393f76b1">~DataRef</a>() {}
<a name="l00039"></a>00039 <a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>& <a class="code" href="classflopc_1_1DataRef.html#a05eca626408ee12e2fbb0badc2dd6352">such_that</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__boolean.html" title="Reference counted class for all "boolean" types of data.This contains counters to ConstantBase pointe...">MP_boolean</a>& b);
<a name="l00040"></a>00040 <span class="keywordtype">double</span> <a class="code" href="classflopc_1_1DataRef.html#a0240d92e570282aee9d2f8876549602f">evaluate</a>() <span class="keyword">const</span>;
<a name="l00041"></a>00041 <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1DataRef.html#a5e7d49c7d16f46e15e39ce8d3e66af32">getStage</a>() <span class="keyword">const</span>;
<a name="l00042"></a>00042 <span class="keyword">const</span> <a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>& <a class="code" href="classflopc_1_1DataRef.html#a7f9aaf81e93e9dc22dc1595556c58d03">operator=</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>& r);
<a name="l00043"></a>00043 <span class="keyword">const</span> <a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>& <a class="code" href="classflopc_1_1DataRef.html#a7f9aaf81e93e9dc22dc1595556c58d03">operator=</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1Constant.html" title="Reference counted class for all "constant" types of data.">Constant</a>& c);
<a name="l00044"></a>00044 <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1DataRef.html#acfd99dc9f8ea4323484a03c0627c94d1">evaluate_lhs</a>(<span class="keywordtype">double</span> v) <span class="keyword">const</span>;
<a name="l00045"></a>00045 <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1DataRef.html#ad10a96243c95dfdb6ad798aade0e989e">operator()</a>() <span class="keyword">const</span>;
<a name="l00046"></a><a class="code" href="classflopc_1_1DataRef.html#a6e4bb6589bfbb57b424ca819062af7db">00046</a> <a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>& <a class="code" href="classflopc_1_1DataRef.html#a6e4bb6589bfbb57b424ca819062af7db">probability</a>(<span class="keywordtype">double</span> p) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
<a name="l00047"></a>00047 <span class="keyword">private</span>:
<a name="l00048"></a><a class="code" href="classflopc_1_1DataRef.html#ad4f56e315a9aed8fa75fd22ac6cc6ee5">00048</a> <a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a>* <a class="code" href="classflopc_1_1DataRef.html#ad4f56e315a9aed8fa75fd22ac6cc6ee5">D</a>;
<a name="l00049"></a><a class="code" href="classflopc_1_1DataRef.html#a08e11631d807501d4491c856bf019baa">00049</a> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a> <a class="code" href="classflopc_1_1DataRef.html#ab5bb7daf5c15c3d731ad8b8f44f4e7c9">I1</a>,<a class="code" href="classflopc_1_1DataRef.html#a460818f97a14ff397ce8aa21b63246ec">I2</a>,<a class="code" href="classflopc_1_1DataRef.html#ae2887af266c2e83e402b76d45deab650">I3</a>,<a class="code" href="classflopc_1_1DataRef.html#a1d484e4fcd684ecce9a7e02c599fa249">I4</a>,<a class="code" href="classflopc_1_1DataRef.html#a08e11631d807501d4491c856bf019baa">I5</a>;
<a name="l00050"></a><a class="code" href="classflopc_1_1DataRef.html#ada593bf73adab224647c0cfb8fc82e4d">00050</a> <a class="code" href="classflopc_1_1Constant.html" title="Reference counted class for all "constant" types of data.">Constant</a> <a class="code" href="classflopc_1_1DataRef.html#ada593bf73adab224647c0cfb8fc82e4d">C</a>;
<a name="l00051"></a><a class="code" href="classflopc_1_1DataRef.html#a2ddcff9e00391d7b68f4ed67a9b2f8a7">00051</a> <span class="keywordtype">int</span> <a class="code" href="classflopc_1_1DataRef.html#a2ddcff9e00391d7b68f4ed67a9b2f8a7">stochastic</a>;
<a name="l00052"></a><a class="code" href="classflopc_1_1DataRef.html#a1e7c1f3b2e8e81566b1eeb8825c3b750">00052</a> <a class="code" href="classflopc_1_1MP__boolean.html" title="Reference counted class for all "boolean" types of data.This contains counters to ConstantBase pointe...">MP_boolean</a> <a class="code" href="classflopc_1_1DataRef.html#a1e7c1f3b2e8e81566b1eeb8825c3b750">B</a>;
<a name="l00053"></a>00053 };
<a name="l00054"></a>00054
<a name="l00071"></a><a class="code" href="classflopc_1_1MP__data.html">00071</a> <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1RowMajor.html">RowMajor</a>, <span class="keyword">public</span> <a class="code" href="classflopc_1_1Functor.html" title="Function object. Often used.">Functor</a> , <span class="keyword">public</span> <a class="code" href="classflopc_1_1Named.html" title="Utility interface class for adding a string name onto a structure.">Named</a> {
<a name="l00072"></a><a class="code" href="classflopc_1_1MP__data.html#ad46bcd6c736f8aa23c225fa0fce74141">00072</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__variable.html" title="Symantic representation of a variable.This is one of the main public interface classes. It should be directly declared by clients of the FlopC++. The parametersof construction are MP_set s which specify the indexes over which the variable is defined.">MP_variable</a>;
<a name="l00073"></a><a class="code" href="classflopc_1_1MP__data.html#a447e3b72d78fccdbe914b91c5b997f37">00073</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__data.html#a447e3b72d78fccdbe914b91c5b997f37">DisplayData</a>;
<a name="l00074"></a><a class="code" href="classflopc_1_1MP__data.html#a9321e371f74bd5d738bcf31073b12ee7">00074</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>;
<a name="l00075"></a><a class="code" href="classflopc_1_1MP__data.html#a1bd5161381d3369e2db399cbfaf1410f">00075</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__model.html" title="This is the anchor point for all constructs in a FlopC++ model.The constructors take an OsiSolverInte...">MP_model</a>;
<a name="l00076"></a>00076 <span class="keyword">public</span>:
<a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__data.html#ac391eee6ead65c1a9ba2368fda5f9d38">operator()</a>() <span class="keyword">const</span>;
<a name="l00079"></a><a class="code" href="classflopc_1_1MP__data.html#a0d504452014fe303f2492da5965bc74d">00079</a> <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__data.html#a0d504452014fe303f2492da5965bc74d" title="similar to value() but copies the same value to all entries.">initialize</a>(<span class="keywordtype">double</span> d) {
<a name="l00080"></a>00080 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(); i++) {
<a name="l00081"></a>00081 <a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">v</a>[i] = d;
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083 }
<a name="l00087"></a><a class="code" href="classflopc_1_1MP__data.html#a6e23403460a018448c91babec84731c8">00087</a> <a class="code" href="classflopc_1_1MP__data.html#a6e23403460a018448c91babec84731c8">MP_data</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s1 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00088"></a>00088 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s2 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00089"></a>00089 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s3 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00090"></a>00090 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s4 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00091"></a>00091 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s5 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>()) :
<a name="l00092"></a>00092 <a class="code" href="classflopc_1_1RowMajor.html">RowMajor</a>(s1.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s2.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s3.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s4.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s5.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>()),
<a name="l00093"></a>00093 <a class="code" href="classflopc_1_1MP__data.html#ab9be0877f8068918ca450a31923794b6">S1</a>(s1),<a class="code" href="classflopc_1_1MP__data.html#abd454250fbe71973a967a937673ac3b1">S2</a>(s2),<a class="code" href="classflopc_1_1MP__data.html#ad6928e96705c292de0007556f8d7d243">S3</a>(s3),<a class="code" href="classflopc_1_1MP__data.html#af9845c7a7a1c0b2ea8ad8c5330f5f58e">S4</a>(s4),<a class="code" href="classflopc_1_1MP__data.html#af1b4ac3b93bfdddd3376b9f1ea34d895">S5</a>(s5),
<a name="l00094"></a>00094 <a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">v</a>(new double[<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>()]), <a class="code" href="classflopc_1_1MP__data.html#a3db5d2b1bb9ef1fa3fabdbf2e69e9e22">manageData</a>(true)
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096 <a class="code" href="classflopc_1_1MP__data.html#a0d504452014fe303f2492da5965bc74d" title="similar to value() but copies the same value to all entries.">initialize</a>(0);
<a name="l00097"></a>00097 }
<a name="l00098"></a>00098
<a name="l00102"></a><a class="code" href="classflopc_1_1MP__data.html#aac874e13cb2b0eaa628732d8557ad6c8">00102</a> <a class="code" href="classflopc_1_1MP__data.html#a6e23403460a018448c91babec84731c8">MP_data</a>(<span class="keywordtype">double</span>* <a class="code" href="classflopc_1_1MP__data.html#a5b74975dde46aeddf14238ef5a35090e" title="Used to bind and deep copy data into the MP_data data structure.">value</a>,
<a name="l00103"></a>00103 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s1 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00104"></a>00104 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s2 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00105"></a>00105 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s3 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00106"></a>00106 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s4 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00107"></a>00107 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s5 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>()) :
<a name="l00108"></a>00108 <a class="code" href="classflopc_1_1RowMajor.html">RowMajor</a>(s1.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s2.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s3.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s4.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(),s5.<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>()),
<a name="l00109"></a>00109 <a class="code" href="classflopc_1_1MP__data.html#ab9be0877f8068918ca450a31923794b6">S1</a>(s1),<a class="code" href="classflopc_1_1MP__data.html#abd454250fbe71973a967a937673ac3b1">S2</a>(s2),<a class="code" href="classflopc_1_1MP__data.html#ad6928e96705c292de0007556f8d7d243">S3</a>(s3),<a class="code" href="classflopc_1_1MP__data.html#af9845c7a7a1c0b2ea8ad8c5330f5f58e">S4</a>(s4),<a class="code" href="classflopc_1_1MP__data.html#af1b4ac3b93bfdddd3376b9f1ea34d895">S5</a>(s5),
<a name="l00110"></a>00110 <a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">v</a>(value), <a class="code" href="classflopc_1_1MP__data.html#a3db5d2b1bb9ef1fa3fabdbf2e69e9e22">manageData</a>(false)
<a name="l00111"></a>00111 { }
<a name="l00112"></a>00112
<a name="l00113"></a><a class="code" href="classflopc_1_1MP__data.html#a070311ae803e9148e52394d32b9efe18">00113</a> <a class="code" href="classflopc_1_1MP__data.html#a070311ae803e9148e52394d32b9efe18">~MP_data</a>() {
<a name="l00114"></a>00114 <span class="keywordflow">if</span> (<a class="code" href="classflopc_1_1MP__data.html#a3db5d2b1bb9ef1fa3fabdbf2e69e9e22">manageData</a> == <span class="keyword">true</span>) <span class="keyword">delete</span>[] <a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">v</a>;
<a name="l00115"></a>00115 }
<a name="l00116"></a>00116
<a name="l00118"></a><a class="code" href="classflopc_1_1MP__data.html#a5b74975dde46aeddf14238ef5a35090e">00118</a> <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__data.html#a5b74975dde46aeddf14238ef5a35090e" title="Used to bind and deep copy data into the MP_data data structure.">value</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>* d) {
<a name="l00119"></a>00119 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<<a class="code" href="classflopc_1_1RowMajor.html#a4e4b4ea266e1a482a0ccfafbc27e65df">size</a>(); i++) {
<a name="l00120"></a>00120 <a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">v</a>[i] = d[i];
<a name="l00121"></a>00121 }
<a name="l00122"></a>00122 }
<a name="l00123"></a>00123
<a name="l00125"></a><a class="code" href="classflopc_1_1MP__data.html#ae368f92e28d25de87bb02578df56a232">00125</a> <a class="code" href="classflopc_1_1MP__data.html#ae368f92e28d25de87bb02578df56a232">operator double</a>() {
<a name="l00126"></a>00126 <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__data.html#ac391eee6ead65c1a9ba2368fda5f9d38">operator()</a>(0);
<a name="l00127"></a>00127 }
<a name="l00128"></a>00128
<a name="l00133"></a><a class="code" href="classflopc_1_1MP__data.html#a20a0b6c034428c722be14107d45d7354">00133</a> <span class="keywordtype">double</span>& <a class="code" href="classflopc_1_1MP__data.html#a20a0b6c034428c722be14107d45d7354">operator()</a>(<span class="keywordtype">int</span> lcli1, <span class="keywordtype">int</span> lcli2=0, <span class="keywordtype">int</span> lcli3=0, <span class="keywordtype">int</span> lcli4=0, <span class="keywordtype">int</span> lcli5=0) {
<a name="l00134"></a>00134 lcli1 = <a class="code" href="classflopc_1_1MP__data.html#ab9be0877f8068918ca450a31923794b6">S1</a>.<a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">check</a>(lcli1);
<a name="l00135"></a>00135 lcli2 = <a class="code" href="classflopc_1_1MP__data.html#abd454250fbe71973a967a937673ac3b1">S2</a>.<a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">check</a>(lcli2);
<a name="l00136"></a>00136 lcli3 = <a class="code" href="classflopc_1_1MP__data.html#ad6928e96705c292de0007556f8d7d243">S3</a>.<a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">check</a>(lcli3);
<a name="l00137"></a>00137 lcli4 = <a class="code" href="classflopc_1_1MP__data.html#af9845c7a7a1c0b2ea8ad8c5330f5f58e">S4</a>.<a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">check</a>(lcli4);
<a name="l00138"></a>00138 lcli5 = <a class="code" href="classflopc_1_1MP__data.html#af1b4ac3b93bfdddd3376b9f1ea34d895">S5</a>.<a class="code" href="classflopc_1_1MP__set__base.html#aca7d262458d186081853ed399882ff8b">check</a>(lcli5);
<a name="l00139"></a>00139 <span class="keywordtype">int</span> i = <a class="code" href="classflopc_1_1RowMajor.html#a2ba5872d80f1d775eb0b1fac6778c1d6">f</a>(lcli1,lcli2,lcli3,lcli4,lcli5);
<a name="l00140"></a>00140 <span class="keywordflow">if</span> (i == <a class="code" href="namespaceflopc.html#ac260440d0c7db7b8b6bb659a90d7883a" title="Distinct return value on conditions where an index goes out of bounds.">outOfBound</a>) {
<a name="l00141"></a>00141 <a class="code" href="classflopc_1_1MP__data.html#a9b1018ece8d6458b943d963f5f0ea8f9">outOfBoundData</a> = 0;
<a name="l00142"></a>00142 <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__data.html#a9b1018ece8d6458b943d963f5f0ea8f9">outOfBoundData</a>;
<a name="l00143"></a>00143 } <span class="keywordflow">else</span> {
<a name="l00144"></a>00144 <span class="keywordflow">return</span> <a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">v</a>[i];
<a name="l00145"></a>00145 }
<a name="l00146"></a>00146 }
<a name="l00147"></a>00147
<a name="l00152"></a><a class="code" href="classflopc_1_1MP__data.html#afee9b0d8ebe7254e2a9c68309be09464">00152</a> <a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>& <a class="code" href="classflopc_1_1MP__data.html#ac391eee6ead65c1a9ba2368fda5f9d38">operator() </a>(
<a name="l00153"></a>00153 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli1 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00154"></a>00154 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli2 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00155"></a>00155 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli3 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00156"></a>00156 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli4 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00157"></a>00157 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli5 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>()
<a name="l00158"></a>00158 ) {
<a name="l00159"></a>00159 <a class="code" href="classflopc_1_1MP__data.html#afa7df5ec67c2ab3670c11298fd68110e">myrefs</a>.push_back(<span class="keyword">new</span> <a class="code" href="classflopc_1_1MP__data.html#a9321e371f74bd5d738bcf31073b12ee7">DataRef</a>(<span class="keyword">this</span>, lcli1, lcli2, lcli3, lcli4, lcli5));
<a name="l00160"></a>00160 <span class="keywordflow">return</span> *<a class="code" href="classflopc_1_1MP__data.html#afa7df5ec67c2ab3670c11298fd68110e">myrefs</a>.back();
<a name="l00161"></a>00161 }
<a name="l00162"></a>00162
<a name="l00163"></a>00163
<a name="l00165"></a>00165 <span class="keywordtype">void</span> <a class="code" href="classflopc_1_1MP__data.html#ae2eae99967cf564372b8f29a9603753a" title="For displaying data in a human readable format.">display</a>(<span class="keywordtype">string</span> s = <span class="stringliteral">""</span>);
<a name="l00166"></a>00166 <span class="keyword">protected</span>:
<a name="l00167"></a><a class="code" href="classflopc_1_1MP__data.html#afa7df5ec67c2ab3670c11298fd68110e">00167</a> vector<DataRef*> <a class="code" href="classflopc_1_1MP__data.html#afa7df5ec67c2ab3670c11298fd68110e">myrefs</a>;
<a name="l00168"></a>00168 <span class="keyword">private</span>:
<a name="l00169"></a>00169 <a class="code" href="classflopc_1_1MP__data.html#a6e23403460a018448c91babec84731c8">MP_data</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a>&); <span class="comment">// Forbid copy constructor</span>
<a name="l00170"></a>00170 <a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a>& <a class="code" href="classflopc_1_1MP__data.html#a9e814bd09a8425c3a5171a0a26813507">operator=</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a>&); <span class="comment">// Forbid assignment</span>
<a name="l00171"></a>00171
<a name="l00172"></a><a class="code" href="classflopc_1_1MP__data.html#a9b1018ece8d6458b943d963f5f0ea8f9">00172</a> <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="classflopc_1_1MP__data.html#a9b1018ece8d6458b943d963f5f0ea8f9">outOfBoundData</a>;
<a name="l00173"></a>00173
<a name="l00174"></a><a class="code" href="classflopc_1_1MP__data.html#a2ff84be9fbdde37393274fcf82e35835">00174</a> <a class="code" href="classflopc_1_1MP__index.html" title="Representation of an index.This is one of the main public interface classes. It is used to iterate th...">MP_index</a> <a class="code" href="classflopc_1_1MP__data.html#afb2a0be510d623392f5875643105e479">i1</a>,<a class="code" href="classflopc_1_1MP__data.html#a5be31d8d85289fb927b0afbf88518898">i2</a>,<a class="code" href="classflopc_1_1MP__data.html#a42df3a839009097ff07710936dd63675">i3</a>,<a class="code" href="classflopc_1_1MP__data.html#a9b1b6610ced264c7e4f18dcbd76cf535">i4</a>,<a class="code" href="classflopc_1_1MP__data.html#a2ff84be9fbdde37393274fcf82e35835">i5</a>;
<a name="l00175"></a><a class="code" href="classflopc_1_1MP__data.html#af1b4ac3b93bfdddd3376b9f1ea34d895">00175</a> <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &<a class="code" href="classflopc_1_1MP__data.html#ab9be0877f8068918ca450a31923794b6">S1</a>,&<a class="code" href="classflopc_1_1MP__data.html#abd454250fbe71973a967a937673ac3b1">S2</a>,&<a class="code" href="classflopc_1_1MP__data.html#ad6928e96705c292de0007556f8d7d243">S3</a>,&<a class="code" href="classflopc_1_1MP__data.html#af9845c7a7a1c0b2ea8ad8c5330f5f58e">S4</a>,&<a class="code" href="classflopc_1_1MP__data.html#af1b4ac3b93bfdddd3376b9f1ea34d895">S5</a>;
<a name="l00176"></a><a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">00176</a> <span class="keywordtype">double</span>* <a class="code" href="classflopc_1_1MP__data.html#a5997387129d09d91b869e940d27a6ed9">v</a>;
<a name="l00177"></a><a class="code" href="classflopc_1_1MP__data.html#a3db5d2b1bb9ef1fa3fabdbf2e69e9e22">00177</a> <span class="keywordtype">bool</span> <a class="code" href="classflopc_1_1MP__data.html#a3db5d2b1bb9ef1fa3fabdbf2e69e9e22">manageData</a>;
<a name="l00178"></a>00178 };
<a name="l00179"></a>00179
<a name="l00180"></a><a class="code" href="classflopc_1_1MP__stochastic__data.html">00180</a> <span class="keyword">class </span><a class="code" href="classflopc_1_1MP__stochastic__data.html">MP_stochastic_data</a> : <span class="keyword">public</span> <a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a> {
<a name="l00181"></a>00181 <span class="keyword">public</span>:
<a name="l00182"></a><a class="code" href="classflopc_1_1MP__stochastic__data.html#a69846e788987321a0b141eb73acd5332">00182</a> <a class="code" href="classflopc_1_1MP__stochastic__data.html#a69846e788987321a0b141eb73acd5332">MP_stochastic_data</a>(<span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s1 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00183"></a>00183 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s2 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00184"></a>00184 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s3 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00185"></a>00185 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s4 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>(),
<a name="l00186"></a>00186 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__set__base.html" title="Internal representation of a "set".">MP_set_base</a> &s5 = <a class="code" href="classflopc_1_1MP__set.html#a23d5cd95f9426b0c762b65ddb1365ea1" title="gets the distinct 'empty' MP_set.">MP_set::getEmpty</a>()) :
<a name="l00187"></a>00187 <a class="code" href="classflopc_1_1MP__data.html" title="Input data set.This is one of the main public interface classes. It is normally directly constructed ...">MP_data</a>(s1,s2,s3,s4,s5) {}
<a name="l00188"></a>00188
<a name="l00189"></a>00189 <span class="keyword">using</span> flopc::MP_data::operator(); <span class="comment">// From bugsquashing party. Some compiler needs this? </span>
<a name="l00190"></a>00190
<a name="l00191"></a><a class="code" href="classflopc_1_1MP__stochastic__data.html#a858a54bc6bd3917683371a7920c29719">00191</a> <a class="code" href="classflopc_1_1DataRef.html" title="Reference to a set of data.">DataRef</a>& <a class="code" href="classflopc_1_1MP__data.html#ac391eee6ead65c1a9ba2368fda5f9d38">operator() </a>(
<a name="l00192"></a>00192 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli1 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00193"></a>00193 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli2 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00194"></a>00194 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli3 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00195"></a>00195 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli4 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>(),
<a name="l00196"></a>00196 <span class="keyword">const</span> <a class="code" href="classflopc_1_1MP__index__exp.html" title="Representation of an expression involving an index.This is one of the main public interface classes...">MP_index_exp</a>& lcli5 = <a class="code" href="classflopc_1_1MP__index__exp.html#a47f2d9c7e4bd216513230ec7b0956d12" title="Return the unique empty expression.">MP_index_exp::getEmpty</a>()
<a name="l00197"></a>00197 ) {
<a name="l00198"></a>00198 <a class="code" href="classflopc_1_1MP__data.html#afa7df5ec67c2ab3670c11298fd68110e">myrefs</a>.push_back(<span class="keyword">new</span> <a class="code" href="classflopc_1_1MP__data.html#a9321e371f74bd5d738bcf31073b12ee7">DataRef</a>(<span class="keyword">this</span>, lcli1, lcli2, lcli3, lcli4, lcli5, 1));
<a name="l00199"></a>00199 <span class="keywordflow">return</span> *<a class="code" href="classflopc_1_1MP__data.html#afa7df5ec67c2ab3670c11298fd68110e">myrefs</a>.back();
<a name="l00200"></a>00200 }
<a name="l00201"></a>00201 };
<a name="l00202"></a>00202
<a name="l00203"></a>00203 } <span class="comment">// End of namespace flopc</span>
<a name="l00204"></a>00204 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Jun 28 2011 23:46:24 for FLOPC++ by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
|