<ahref="LinearExpr_8java.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="comment">// Copyright 2010-2021 Google LLC</span></div>
<divclass="line"><aid="l00002"name="l00002"></a><spanclass="lineno"> 2</span><spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
<divclass="line"><aid="l00003"name="l00003"></a><spanclass="lineno"> 3</span><spanclass="comment">// you may not use this file except in compliance with the License.</span></div>
<divclass="line"><aid="l00004"name="l00004"></a><spanclass="lineno"> 4</span><spanclass="comment">// You may obtain a copy of the License at</span></div>
<divclass="line"><aid="l00008"name="l00008"></a><spanclass="lineno"> 8</span><spanclass="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<divclass="line"><aid="l00009"name="l00009"></a><spanclass="lineno"> 9</span><spanclass="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
<divclass="line"><aid="l00010"name="l00010"></a><spanclass="lineno"> 10</span><spanclass="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<divclass="line"><aid="l00011"name="l00011"></a><spanclass="lineno"> 11</span><spanclass="comment">// See the License for the specific language governing permissions and</span></div>
<divclass="line"><aid="l00012"name="l00012"></a><spanclass="lineno"> 12</span><spanclass="comment">// limitations under the License.</span></div>
<divclass="ttc"id="aclasscom_1_1google_1_1ortools_1_1sat_1_1AffineExpression_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1AffineExpression.html">com.google.ortools.sat.AffineExpression</a></div><divclass="ttdoc">A specialized linear expression: a * x + b.</div><divclass="ttdef"><b>Definition:</b><ahref="AffineExpression_8java_source.html#l00017">AffineExpression.java:17</a></div></div>
<divclass="ttc"id="aclasscom_1_1google_1_1ortools_1_1sat_1_1ConstantExpression_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1ConstantExpression.html">com.google.ortools.sat.ConstantExpression</a></div><divclass="ttdoc">A specialized constant linear expression.</div><divclass="ttdef"><b>Definition:</b><ahref="ConstantExpression_8java_source.html#l00017">ConstantExpression.java:17</a></div></div>
<divclass="ttc"id="aclasscom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder.html">com.google.ortools.sat.LinearExprBuilder</a></div><divclass="ttdoc">Builder class for the LinearExpr container.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExprBuilder_8java_source.html#l00020">LinearExprBuilder.java:20</a></div></div>
<divclass="ttc"id="aclasscom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder_html_a68a038d4ae2f7cf74dfa8e8fe21c4feb"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder.html#a68a038d4ae2f7cf74dfa8e8fe21c4feb">com.google.ortools.sat.LinearExprBuilder.build</a></div><divclass="ttdeci">LinearExpr build()</div><divclass="ttdoc">Builds a linear expression.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExprBuilder_8java_source.html#l00071">LinearExprBuilder.java:71</a></div></div>
<divclass="ttc"id="aclasscom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder_html_afe458481a51c77d39c76ba6876235659"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1LinearExprBuilder.html#afe458481a51c77d39c76ba6876235659">com.google.ortools.sat.LinearExprBuilder.addTerm</a></div><divclass="ttdeci">LinearExprBuilder addTerm(LinearArgument expr, long coeff)</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExprBuilder_8java_source.html#l00039">LinearExprBuilder.java:39</a></div></div>
<divclass="ttc"id="aclasscom_1_1google_1_1ortools_1_1sat_1_1WeightedSumExpression_html"><divclass="ttname"><ahref="classcom_1_1google_1_1ortools_1_1sat_1_1WeightedSumExpression.html">com.google.ortools.sat.WeightedSumExpression</a></div><divclass="ttdoc">A specialized linear expression: sum(ai * xi) + b.</div><divclass="ttdef"><b>Definition:</b><ahref="WeightedSumExpression_8java_source.html#l00017">WeightedSumExpression.java:17</a></div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearArgument_html"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearArgument.html">com.google.ortools.sat.LinearArgument</a></div><divclass="ttdoc">A object that can build a LinearExpr object.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearArgument_8java_source.html#l00021">LinearArgument.java:21</a></div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html">com.google.ortools.sat.LinearExpr</a></div><divclass="ttdoc">A linear expression (sum (ai * xi) + b).</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00019">LinearExpr.java:19</a></div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_a24795874be9833b782984bc96bbcfd4a"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#a24795874be9833b782984bc96bbcfd4a">com.google.ortools.sat.LinearExpr.term</a></div><divclass="ttdeci">static LinearExpr term(LinearArgument expr, long coeff)</div><divclass="ttdoc">Shortcut for newBuilder().addTerm(expr, coeff).build()</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00043">LinearExpr.java:43</a></div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_a2c77626134edecc47b69efe661ea1904"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#a2c77626134edecc47b69efe661ea1904">com.google.ortools.sat.LinearExpr.getCoefficient</a></div><divclass="ttdeci">long getCoefficient(int index)</div><divclass="ttdoc">Returns the ith coefficient.</div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_a59f9cb76db051cd784a42f38220f896d"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#a59f9cb76db051cd784a42f38220f896d">com.google.ortools.sat.LinearExpr.numElements</a></div><divclass="ttdeci">int numElements()</div><divclass="ttdoc">Returns the number of terms (excluding the constant one) in this expression.</div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_a76dee6b003f35fcdd802b013d4deec60"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#a76dee6b003f35fcdd802b013d4deec60">com.google.ortools.sat.LinearExpr.affine</a></div><divclass="ttdeci">static LinearExpr affine(LinearArgument expr, long coeff, long offset)</div><divclass="ttdoc">Shortcut for newBuilder().addTerm(expr, coeff).add(offset).build()</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00048">LinearExpr.java:48</a></div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_aa67a97afc7ff974a68379b0a13dc8a39"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#aa67a97afc7ff974a68379b0a13dc8a39">com.google.ortools.sat.LinearExpr.newBuilder</a></div><divclass="ttdeci">static LinearExprBuilder newBuilder()</div><divclass="ttdoc">Returns a builder.</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00033">LinearExpr.java:33</a></div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_aa7d6a5c7e69f4efdc6a44b85bbe22f1a"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#aa7d6a5c7e69f4efdc6a44b85bbe22f1a">com.google.ortools.sat.LinearExpr.getOffset</a></div><divclass="ttdeci">long getOffset()</div><divclass="ttdoc">Returns the constant part of the expression.</div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_aabd5eab5be1618da7812710dd2cdedd6"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#aabd5eab5be1618da7812710dd2cdedd6">com.google.ortools.sat.LinearExpr.constant</a></div><divclass="ttdeci">static LinearExpr constant(long value)</div><divclass="ttdoc">Shortcut for newBuilder().add(value).build()</div><divclass="ttdef"><b>Definition:</b><ahref="LinearExpr_8java_source.html#l00038">LinearExpr.java:38</a></div></div>
<divclass="ttc"id="ainterfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr_html_ae9592a449a7c3bdebd04b8ea4f174871"><divclass="ttname"><ahref="interfacecom_1_1google_1_1ortools_1_1sat_1_1LinearExpr.html#ae9592a449a7c3bdebd04b8ea4f174871">com.google.ortools.sat.LinearExpr.getVariableIndex</a></div><divclass="ttdeci">int getVariableIndex(int index)</div><divclass="ttdoc">Returns the index of the ith variable.</div></div>