Update python doc

This commit is contained in:
Corentin Le Molgat
2020-01-31 17:05:44 +01:00
parent 5d6b4560e8
commit 292ae01866
6 changed files with 111 additions and 46 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.7.2" />
<meta name="generator" content="pdoc 0.7.4" />
<title>cp_model API documentation</title>
<meta name="description" content="Methods for building and solving CP-SAT models …" />
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
@@ -1588,6 +1588,10 @@ def EvaluateLinearExpr(expression, solution):
&#34;&#34;&#34;Evaluate a linear expression against a solution.&#34;&#34;&#34;
if isinstance(expression, numbers.Integral):
return expression
if not isinstance(expression, LinearExpr):
raise TypeError(&#39;Cannot interpret %s as a linear expression.&#39; %
expression)
value = 0
to_process = [(expression, 1)]
while to_process:
@@ -1810,6 +1814,10 @@ class CpSolverSolutionCallback(pywrapsat.SolutionCallback):
raise RuntimeError(&#39;Solve() has not be called.&#39;)
if isinstance(expression, numbers.Integral):
return expression
if not isinstance(expression, LinearExpr):
raise TypeError(&#39;Cannot interpret %s as a linear expression.&#39; %
expression)
value = 0
to_process = [(expression, 1)]
while to_process:
@@ -5093,6 +5101,10 @@ and Value() methods.</p>
raise RuntimeError(&#39;Solve() has not be called.&#39;)
if isinstance(expression, numbers.Integral):
return expression
if not isinstance(expression, LinearExpr):
raise TypeError(&#39;Cannot interpret %s as a linear expression.&#39; %
expression)
value = 0
to_process = [(expression, 1)]
while to_process:
@@ -5228,6 +5240,10 @@ Raises:
raise RuntimeError(&#39;Solve() has not be called.&#39;)
if isinstance(expression, numbers.Integral):
return expression
if not isinstance(expression, LinearExpr):
raise TypeError(&#39;Cannot interpret %s as a linear expression.&#39; %
expression)
value = 0
to_process = [(expression, 1)]
while to_process:
@@ -5552,7 +5568,6 @@ intervals into the schedule.</p></section>
</dd>
<dt id="cp_model.LinearExpr"><code class="flex name class">
<span>class <span class="ident">LinearExpr</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<section class="desc"><p>Holds an integer linear expression.</p>
@@ -5765,11 +5780,11 @@ model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) &gt;= 0)
</details>
<h3>Subclasses</h3>
<ul class="hlist">
<li>cp_model._ProductCst</li>
<li>cp_model._SumArray</li>
<li>cp_model._ScalProd</li>
<li><a title="cp_model.IntVar" href="#cp_model.IntVar">IntVar</a></li>
<li>cp_model._NotBooleanVariable</li>
<li>cp_model._ProductCst</li>
<li>cp_model._ScalProd</li>
<li>cp_model._SumArray</li>
</ul>
<h3>Static methods</h3>
<dl>
@@ -6280,7 +6295,7 @@ def Term(cls, expression, coefficient):
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.2</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.4</a>.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad()</script>