Files
ortools-clone/docs/java/DoubleLinearExpr_8java_source.html

115 lines
47 KiB
HTML
Raw Normal View History

2021-12-14 13:41:01 +01:00
<!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>
<title>OR-Tools</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">Google OR-Tools 9.2</span>
</div>
</div>
<div id="content" style="width: 100%; overflow: hidden;">
<div style="margin-left: 15px; margin-top: 5px; float: left; color: #145A32;">
<h2>Java Reference</h2>
<ul>
<li><a href="../java/namespacecom_1_1google_1_1ortools_1_1sat.html">CP-SAT</a></li>
<li><a href="../java/namespacecom_1_1google_1_1ortools_1_1graph.html">Graph</a></li>
<li><a href="../java/namespacecom_1_1google_1_1ortools_1_1algorithms.html">Knapsack solver</a></li>
<li><a href="../java/namespacecom_1_1google_1_1ortools_1_1linearsolver.html">Linear solver</a></li>
<li><a href="../java/namespacecom_1_1google_1_1ortools_1_1constraintsolver.html">Routing</a></li>
<li><a href="../java/namespacecom_1_1google_1_1ortools_1_1util.html">Util</a></li>
</ul>
</div>
<div id="content">
<div align="center">
<h1 style="color: #145A32;">Java Reference</h1>
</div>
2022-01-16 18:02:36 +01:00
<!-- Generated by Doxygen 1.8.15 -->
2021-12-14 13:41:01 +01:00
<script type="text/javascript">
2022-01-16 18:02:36 +01:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
2021-12-14 13:41:01 +01:00
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
2022-01-16 18:02:36 +01:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
2021-12-14 13:41:01 +01:00
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
2022-01-16 18:02:36 +01:00
/* @license-end */</script>
2021-12-14 13:41:01 +01:00
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
2022-01-16 18:02:36 +01:00
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('DoubleLinearExpr_8java_source.html','');});
2021-12-14 13:41:01 +01:00
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
2022-01-16 18:02:36 +01:00
<div class="headertitle">
<div class="title">DoubleLinearExpr.java</div> </div>
2021-12-14 13:41:01 +01:00
</div><!--header-->
<div class="contents">
2022-01-16 18:02:36 +01:00
<a href="DoubleLinearExpr_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2010-2021 Google LLC</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// limitations under the License.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="keyword">package </span>com.google.ortools.sat;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html"> 17</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html">DoubleLinearExpr</a> {</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; <span class="keyword">private</span> <span class="keyword">final</span> <span class="keywordtype">int</span>[] variableIndices;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; <span class="keyword">private</span> <span class="keyword">final</span> <span class="keywordtype">double</span>[] coefficients;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <span class="keyword">private</span> <span class="keywordtype">double</span> offset;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; <span class="keyword">static</span> <a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html">DoubleLinearExpr</a> sum(<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html">IntVar</a>[] variables) {</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="keywordflow">return</span> sumWithOffset(variables, 0.0);</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; }</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div><div class="line"><a name="l00028"></
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_aaa5a3beff8b1ae1891b8c4e4e66d2dc1"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#aaa5a3beff8b1ae1891b8c4e4e66d2dc1">com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr</a></div><div class="ttdeci">DoubleLinearExpr(IntVar[] vars, double offset)</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00172">DoubleLinearExpr.java:172</a></div></div>
<div class="ttc" id="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal_html_a9e2c0b0299cf2164e32a7fbc543a7ea6"><div class="ttname"><a href="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html#a9e2c0b0299cf2164e32a7fbc543a7ea6">com.google.ortools.sat.Literal.not</a></div><div class="ttdeci">Literal not()</div><div class="ttdoc">Returns the Boolean negation of the current literal.</div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_ac832bdb8a12317239ec2111a4f101937"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#ac832bdb8a12317239ec2111a4f101937">com.google.ortools.sat.DoubleLinearExpr.getOffset</a></div><div class="ttdeci">double getOffset()</div><div class="ttdoc">Returns the constant part of the expression.</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00121">DoubleLinearExpr.java:121</a></div></div>
<div class="ttc" id="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal_html_a59d053c950ff1e9f8a004d493f34e754"><div class="ttname"><a href="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html#a59d053c950ff1e9f8a004d493f34e754">com.google.ortools.sat.Literal.getIndex</a></div><div class="ttdeci">int getIndex()</div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_1_1MismatchedArrayLengths_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_1_1MismatchedArrayLengths.html">com.google.ortools.sat.CpModel.MismatchedArrayLengths</a></div><div class="ttdoc">Exception thrown when parallel arrays have mismatched lengths.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8java_source.html#l00052">CpModel.java:52</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_a93acce61f7f68d66ad25b91189fc97a9"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#a93acce61f7f68d66ad25b91189fc97a9">com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr</a></div><div class="ttdeci">DoubleLinearExpr(Literal[] literals, double[] coefficients, double offset)</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00134">DoubleLinearExpr.java:134</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_ae399d74a55ff26718e487c7b689930d9"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#ae399d74a55ff26718e487c7b689930d9">com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr</a></div><div class="ttdeci">DoubleLinearExpr(Literal[] literals, double offset)</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00184">DoubleLinearExpr.java:184</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html">com.google.ortools.sat.DoubleLinearExpr</a></div><div class="ttdoc">A linear expression interface that can be parsed.</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00017">DoubleLinearExpr.java:17</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html">com.google.ortools.sat.IntVar</a></div><div class="ttdoc">An integer variable.</div><div class="ttdef"><b>Definition:</b> <a href="java_2com_2google_2ortools_2sat_2IntVar_8java_source.html#l00021">java/com/google/ortools/sat/IntVar.java:21</a></div></div>
<div class="ttc" id="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal_html"><div class="ttname"><a href="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html">com.google.ortools.sat.Literal</a></div><div class="ttdoc">Interface to describe a boolean variable or its negation.</div><div class="ttdef"><b>Definition:</b> <a href="Literal_8java_source.html#l00017">Literal.java:17</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html">com.google.ortools.sat.CpModel</a></div><div class="ttdoc">Main modeling class.</div><div class="ttdef"><b>Definition:</b> <a href="CpModel_8java_source.html#l00043">CpModel.java:43</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_a6b893d7a927b43db07f16cacf339f2e5"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#a6b893d7a927b43db07f16cacf339f2e5">com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr</a></div><div class="ttdeci">DoubleLinearExpr(IntVar var, double coefficient, double offset)</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00154">DoubleLinearExpr.java:154</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_a59f9cb76db051cd784a42f38220f896d"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#a59f9cb76db051cd784a42f38220f896d">com.google.ortools.sat.DoubleLinearExpr.numElements</a></div><div class="ttdeci">int numElements()</div><div class="ttdoc">Returns the number of elements in the interface.</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00100">DoubleLinearExpr.java:100</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_aad41c310d9f1061a9ec88cdfc09673dd"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#aad41c310d9f1061a9ec88cdfc09673dd">com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr</a></div><div class="ttdeci">DoubleLinearExpr(Literal lit, double coefficient, double offset)</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00160">DoubleLinearExpr.java:160</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_ae9592a449a7c3bdebd04b8ea4f174871"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#ae9592a449a7c3bdebd04b8ea4f174871">com.google.ortools.sat.DoubleLinearExpr.getVariableIndex</a></div><div class="ttdeci">int getVariableIndex(int index)</div><div class="ttdoc">Returns the ith variable.</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00105">DoubleLinearExpr.java:105</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar_html_a59d053c950ff1e9f8a004d493f34e754"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html#a59d053c950ff1e9f8a004d493f34e754">com.google.ortools.sat.IntVar.getIndex</a></div><div class="ttdeci">int getIndex()</div><div class="ttdoc">Returns the index of the variable in the underlying CpModelProto.</div><div class="ttdef"><b>Definition:</b> <a href="java_2com_2google_2ortools_2sat_2IntVar_8java_source.html#l00044">java/com/google/ortools/sat/IntVar.java:44</a></div></div>
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr_html_a309223851cf5007ababbf17598a7d0c2"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1DoubleLinearExpr.html#a309223851cf5007ababbf17598a7d0c2">com.google.ortools.sat.DoubleLinearExpr.DoubleLinearExpr</a></div><div class="ttdeci">DoubleLinearExpr(IntVar[] variables, double[] coefficients, double offset)</div><div class="ttdef"><b>Definition:</b> <a href="DoubleLinearExpr_8java_source.html#l00125">DoubleLinearExpr.java:125</a></div></div>
2021-12-14 13:41:01 +01:00
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
</div>
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
</html>