Permalink
Browse files

New workshop, small "strict mode" fixes, small linear programming imp…

…rovement
  • Loading branch information...
1 parent d031439 commit 8d378ac4919aa6956880f35ad485c1eee8dff85c Sébastien Loisel committed Nov 19, 2012
Showing with 283 additions and 257 deletions.
  1. +1 −1 benchmark.html
  2. +2 −2 documentation.html
  3. +1 −1 index.php
  4. +0 −116 resources/style.css
  5. +2 −2 src/documentation.html
  6. +61 −69 src/numeric.js
  7. +4 −4 tools/deploy/mactests.txt
  8. +104 −29 tools/workshop.html
  9. +108 −33 workshop.php
View
@@ -152,7 +152,7 @@
var i,j,foo;
ks = sz.toString();
if(rep>0 && c0[lib][rep-1] < 10) { c0[lib][rep] = c0[lib][rep-1]; }
- else { foo = benchmarks[b][lib+2]; c0[lib][rep] = foo(sz); }
+ else { foo = benchmarks[b][lib+2]; if(k===0) foo(sz); c0[lib][rep] = foo(sz); }
rep++;
if(rep === 1) { rep = 0; lib++; }
if(lib+2 === benchmarks[b].length) {
View
@@ -1209,7 +1209,7 @@
We also handle infeasible problems:
<pre>
IN> numeric.solveLP([1,1],[[1,0],[0,1],[-1,-1]],[-1,-1,-1])
-OUT> { solution: NaN, message: "Infeasible", iterations: 6 }
+OUT> { solution: NaN, message: "Infeasible", iterations: 5 }
</pre>
Unbounded problems:
@@ -1226,7 +1226,7 @@
[[1,1,1]], /* matrix Aeq of equality constraint */
[3] /* vector beq of equality constraint */
);
-OUT> { solution: [3,4.167e-19,1.086e-18], message:"", iterations:11 }
+OUT> { solution:[3,1.685e-16,4.559e-19], message:"", iterations:12 }
</pre>
<!--
View
@@ -15,7 +15,7 @@
The <a href="http://www.numericjs.com/">Numeric Javascript</a> library allows you to perform
sophisticated numerical computations in pure javascript in the browser and elsewhere.<br><br>
-<b>From the <a href="/wordpress/">blog</a>...
+<b>From the <a href="/wordpress/">blog</a>...</b>
<ul style="margin-top:0;">
<?php query_posts('showposts=3'); ?>
<?php while (have_posts()) : the_post(); ?>
View
@@ -114,89 +114,6 @@ background-color:#f0f0ff;
text-decoration:underline;
}
-
-div.notsaved {
- font-weight:bold;
- text-align:center;
- color: #ff0000;
-}
-
-div.col1 {
- float: left;
-}
-div.button {
- display:table-cell;
- font-size: 12px;
- width: 15px;
- font-weight: bold;
- vertical-align: top;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -o-user-select: none;
- user-select: none;
-}
-div.button2 {
- display:table-cell;
- width: 15px;
- font-size: 10px;
- font-weight: bold;
- vertical-align: bottom;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -o-user-select: none;
- user-select: none;
-}
-div.interactions { width:100%; clear:both; display:table; }
-div.spacer { width:5px; }
-div.inner { width:100%; display:table-row; }
-div.input {
- display:table-cell;
- width:100%;
-}
-div.output {
- display:table-cell;
- font-family: monospace;
- font-size: 14px;
- color: #000000;
- vertical-align: top;
- white-space: pre-wrap;
- padding-bottom:5px;
- line-height: 100%;
-}
-div.caret {
- display:table-cell;
- padding-top: 8px;
- width: 30px;
- font-family: sans-serif;
- color: #0000ff;
- vertical-align:top;
- text-align: right;
- font-size: 8px;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -o-user-select: none;
- user-select: none;
-}
-div.out {
- display:table-cell;
- width: 30px;
- padding-top: 4px;
- padding-bottom: 4px;
- font-family: sans-serif;
- color: #000000;
- vertical-align:top;
- text-align: right;
- font-size: 8px;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -o-user-select: none;
- user-select: none;
-}
-
div.plot {
font-family: sans-serif;
font-size: 14px;
@@ -206,39 +123,6 @@ div.plot {
line-height: 100%;
}
-textarea.input {
- resize:none;
- overflow:hidden;
- font-family:monospace;
- font-size:14px;
- margin-top:0px;
- margin-left:1px;
- margin-bottom:1px;
- padding:1px;
- border:2px solid #0000ff;
- background-color: #d0d0ff;
- width: 100%;
- box-sizing: border-box;
- -webkit-box-sizing:border-box;
- -moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
-}
-textarea.runned {
- resize:none;
- overflow:hidden;
- font-family:monospace;
- font-size:14px;
- margin-top:0px;
- margin-left:1px;
- margin-bottom:1px;
- padding:1px;
- border:2px solid #0000ff;
- width: 100%;
- box-sizing: border-box;
- -webkit-box-sizing:border-box;
- -moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
-}
a.button:link { text-decoration: none; color: #0000ff; }
a.button:visited { text-decoration: none; color: #0000ff; }
a.button:active { text-decoration: none; color: #0000ff; }
View
@@ -1209,7 +1209,7 @@
We also handle infeasible problems:
<pre>
IN> numeric.solveLP([1,1],[[1,0],[0,1],[-1,-1]],[-1,-1,-1])
-OUT> { solution: NaN, message: "Infeasible", iterations: 6 }
+OUT> { solution: NaN, message: "Infeasible", iterations: 5 }
</pre>
Unbounded problems:
@@ -1226,7 +1226,7 @@
[[1,1,1]], /* matrix Aeq of equality constraint */
[3] /* vector beq of equality constraint */
);
-OUT> { solution: [3,4.167e-19,1.086e-18], message:"", iterations:11 }
+OUT> { solution:[3,1.685e-16,4.559e-19], message:"", iterations:12 }
</pre>
<!--
Oops, something went wrong.

0 comments on commit 8d378ac

Please sign in to comment.