Author: slotia
Date: 2012-09-06 17:21:08 -0700 (Thu, 06 Sep 2012)
New Revision: 30330
Modified:
core3/api/trunk/work-api/src/main/java/org/cytoscape/work/package-info.java
Log:
Fixed bug in examples in javadoc
Modified:
core3/api/trunk/work-api/src/main/java/org/cytoscape/work/package-info.java
===================================================================
--- core3/api/trunk/work-api/src/main/java/org/cytoscape/work/package-info.java
2012-09-07 00:09:22 UTC (rev 30329)
+++ core3/api/trunk/work-api/src/main/java/org/cytoscape/work/package-info.java
2012-09-07 00:21:08 UTC (rev 30330)
@@ -178,7 +178,7 @@
Task myPiTask = new Task() {
public void run(TaskMonitor monitor) {
double pi = 2.0;
- for (int n = 0; n < iterations; n++) {
+ for (int n = 1; n <= iterations; n++) {
pi *= (2 * n) * (2 * n) / ((2 * n - 1) * (2 * n + 1));
}
logger.info("Our approximation of pi is: " +
Double.toString(pi));
@@ -216,7 +216,7 @@
public void run(TaskMonitor monitor) {
monitor.setTitle("Calculating Pi");
double pi = 2.0;
- for (int n = 0; n < iterations; n++) {
+ for (int n = 1; n <= iterations; n++) {
monitor.setProgress(((double) n) / iterations);
pi *= (2 * n) * (2 * n) / ((2 * n - 1) * (2 * n + 1));
}
@@ -245,7 +245,7 @@
public void run(TaskMonitor monitor) {
monitor.setTitle("Calculating Pi");
double pi = 2.0;
- for (int n = 0; n < iterations; n++) {
+ for (int n = 1; n <= iterations; n++) {
if (cancelled)
break;
monitor.setProgress(((double) n) / iterations);
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.