Author: jm
Date: 2012-01-06 12:51:41 -0800 (Fri, 06 Jan 2012)
New Revision: 27941
Added:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
Log:
Fixes #477: Moved Tunables from Task to TaskFactory; Cleaned up naming of
BioLayoutAlgorithm/Task
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithm.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithm.java
2012-01-06 19:27:26 UTC (rev 27940)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithm.java
2012-01-06 20:51:41 UTC (rev 27941)
@@ -1,234 +1,19 @@
-/**
- * Copyright (c) 2006 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions, and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * 3. Redistributions must acknowledge that this software was
- * originally developed by the UCSF Computer Graphics Laboratory
- * under support by the NIH National Center for Research Resources,
- * grant P41-RR01081.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
package csapps.layout.algorithms.bioLayout;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.cytoscape.model.CyNode;
-import org.cytoscape.view.layout.AbstractPartitionLayoutTask;
-import org.cytoscape.view.layout.EdgeWeighter;
-import org.cytoscape.view.layout.LayoutPartition;
-import org.cytoscape.view.model.CyNetworkView;
-import org.cytoscape.view.model.View;
+import org.cytoscape.view.layout.AbstractLayoutAlgorithm;
import org.cytoscape.work.Tunable;
import org.cytoscape.work.undo.UndoSupport;
+public abstract class BioLayoutAlgorithm extends AbstractLayoutAlgorithm {
+
+ public BioLayoutAlgorithm(UndoSupport undo, String computerName,
+ String humanName, boolean supportsSelectedOnly) {
+ super(undo, computerName, humanName, supportsSelectedOnly);
+ }
-/**
- * Superclass for the two bioLayout algorithms (KK and FR).
- *
- * @author <a href="mailto:[email protected]">Scooter Morris</a>
- * @version 0.9
- */
-public abstract class BioLayoutAlgorithm extends AbstractPartitionLayoutTask {
/**
- * Properties
- */
- private static final int DEBUGPROP = 0;
- private static final int RANDOMIZE = 1;
- private static final int MINWEIGHT = 2;
- private static final int MAXWEIGHT = 3;
- private static final int SELECTEDONLY = 4;
- private static final int LAYOUTATTRIBUTE = 5;
-
- /**
- * A small value used to avoid division by zero
- */
- protected double EPSILON = 0.0000001;
-
- /**
- * Value to set for doing unweighted layouts
- */
- public static final String UNWEIGHTEDATTRIBUTE = "(unweighted)";
-
- /**
- * Enables/disables debugging messages
- */
- private final static boolean DEBUG = false;
- protected static boolean debug = DEBUG; // so we can overload it with a
property
-
- /**
* Whether or not to initialize by randomizing all points
*/
@Tunable(description="Randomize graph before layout", groups="Standard
settings")
public boolean randomize = true;
-
- /**
- * Whether or not to use edge weights for layout
- */
- protected boolean supportWeights = true;
-
- /**
- * This is the constructor for the bioLayout algorithm.
- */
- public BioLayoutAlgorithm(final CyNetworkView networkView, final String
name,
- final boolean selectedOnly, final
Set<View<CyNode>> staticNodes,
- final boolean singlePartition)
- {
- //super(undoSupport);
- super(networkView, name, singlePartition, selectedOnly,
staticNodes);
-
- if (edgeWeighter == null)
- edgeWeighter = new EdgeWeighter();
- }
-
- /**
- * Tells Cytoscape whether we support selected nodes only or not
- *
- * @return true - we do support selected only
- */
- public boolean supportsSelectedOnly() { return true; }
-
-
- /**
- * Tells Cytoscape whether we support edge attribute based layouts
- *
- * @return null if supportWeights is false, otherwise return the
attribute
- * types that can be used for weights.
- */
- public Set<Class<?>> supportsEdgeAttributes() {
- Set<Class<?>> ret = new HashSet<Class<?>>();
- if (!supportWeights)
- return ret;
-
- ret.add(Integer.class);
- ret.add(Double.class);
-
- return ret;
- }
-
- /**
- * Returns "(unweighted)", which is the "attribute" we
- * use to tell the algorithm not to use weights
- *
- * @returns List of our "special" weights
- */
- public List<String> getInitialAttributeList() {
- ArrayList<String> list = new ArrayList<String>();
- list.add(UNWEIGHTEDATTRIBUTE);
-
- return list;
- }
-
- /**
- * Sets the flag that determines if we're to layout all nodes
- * or only selected nodes.
- *
- * @param value the name of the attribute
- */
- public void setSelectedOnly(boolean value) {
- // Inherited by AbstractLayoutAlgorithm
- //selectedOnly = value;
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param value DOCUMENT ME!
- */
- public void setSelectedOnly(String value) {
- Boolean val = new Boolean(value);
- //selectedOnly = val.booleanValue();
- }
-
- /**
- * Sets the debug flag
- *
- * @param flag boolean value that turns debugging on or off
- */
- public void setDebug(boolean flag) {
- debug = flag;
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param value DOCUMENT ME!
- */
- public void setDebug(String value) {
- Boolean val = new Boolean(value);
- debug = val.booleanValue();
- }
-
- /**
- * Sets the randomize flag
- *
- * @param flag boolean value that turns initial randomization on or off
- */
- public void setRandomize(boolean flag) {
- randomize = flag;
- }
-
- /**
- * Sets the randomize flag
- *
- * @param flag boolean string that turns initial randomization on or off
- */
- public void setRandomize(String value) {
- Boolean val = new Boolean(value);
- randomize = val.booleanValue();
- }
-
- /**
- * Main function that must be implemented by the child class.
- */
- public abstract void layoutPartion(LayoutPartition partition);
-
- protected void initialize_local() {
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param message DOCUMENT ME!
- */
- public static void debugln(String message) {
- if (debug) {
- System.err.println(message);
- }
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param message DOCUMENT ME!
- */
- public static void debug(String message) {
- if (debug) {
- System.err.print(message);
- }
- }
}
Copied:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
(from rev 27907,
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithm.java)
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
(rev 0)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutAlgorithmTask.java
2012-01-06 20:51:41 UTC (rev 27941)
@@ -0,0 +1,199 @@
+/**
+ * Copyright (c) 2006 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions, and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * 3. Redistributions must acknowledge that this software was
+ * originally developed by the UCSF Computer Graphics Laboratory
+ * under support by the NIH National Center for Research Resources,
+ * grant P41-RR01081.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+package csapps.layout.algorithms.bioLayout;
+
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.cytoscape.model.CyNode;
+import org.cytoscape.view.layout.AbstractPartitionLayoutTask;
+import org.cytoscape.view.layout.EdgeWeighter;
+import org.cytoscape.view.layout.LayoutPartition;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.view.model.View;
+
+
+/**
+ * Superclass for the two bioLayout algorithms (KK and FR).
+ *
+ * @author <a href="mailto:[email protected]">Scooter Morris</a>
+ * @version 0.9
+ */
+public abstract class BioLayoutAlgorithmTask extends
AbstractPartitionLayoutTask {
+
+ /**
+ * A small value used to avoid division by zero
+ */
+ protected double EPSILON = 0.0000001;
+
+ /**
+ * Value to set for doing unweighted layouts
+ */
+ public static final String UNWEIGHTEDATTRIBUTE = "(unweighted)";
+
+ /**
+ * Enables/disables debugging messages
+ */
+ private final static boolean DEBUG = false;
+ protected static boolean debug = DEBUG; // so we can overload it with a
property
+ protected boolean randomize;
+
+ /**
+ * Whether or not to use edge weights for layout
+ */
+ protected boolean supportWeights = true;
+
+ /**
+ * This is the constructor for the bioLayout algorithm.
+ */
+ public BioLayoutAlgorithmTask(final CyNetworkView networkView, final
String name,
+ final boolean selectedOnly, final
Set<View<CyNode>> staticNodes,
+ final boolean singlePartition, final boolean
randomize)
+ {
+ //super(undoSupport);
+ super(networkView, name, singlePartition, selectedOnly,
staticNodes);
+
+ if (edgeWeighter == null)
+ edgeWeighter = new EdgeWeighter();
+
+ this.randomize = randomize;
+ }
+
+ /**
+ * Tells Cytoscape whether we support selected nodes only or not
+ *
+ * @return true - we do support selected only
+ */
+ public boolean supportsSelectedOnly() { return true; }
+
+
+ /**
+ * Tells Cytoscape whether we support edge attribute based layouts
+ *
+ * @return null if supportWeights is false, otherwise return the
attribute
+ * types that can be used for weights.
+ */
+ public Set<Class<?>> supportsEdgeAttributes() {
+ Set<Class<?>> ret = new HashSet<Class<?>>();
+ if (!supportWeights)
+ return ret;
+
+ ret.add(Integer.class);
+ ret.add(Double.class);
+
+ return ret;
+ }
+
+ /**
+ * Returns "(unweighted)", which is the "attribute" we
+ * use to tell the algorithm not to use weights
+ *
+ * @returns List of our "special" weights
+ */
+ public List<String> getInitialAttributeList() {
+ ArrayList<String> list = new ArrayList<String>();
+ list.add(UNWEIGHTEDATTRIBUTE);
+
+ return list;
+ }
+
+ /**
+ * Sets the debug flag
+ *
+ * @param flag boolean value that turns debugging on or off
+ */
+ public void setDebug(boolean flag) {
+ debug = flag;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param value DOCUMENT ME!
+ */
+ public void setDebug(String value) {
+ Boolean val = new Boolean(value);
+ debug = val.booleanValue();
+ }
+
+ /**
+ * Sets the randomize flag
+ *
+ * @param flag boolean value that turns initial randomization on or off
+ */
+ public void setRandomize(boolean flag) {
+ randomize = flag;
+ }
+
+ /**
+ * Sets the randomize flag
+ *
+ * @param flag boolean string that turns initial randomization on or off
+ */
+ public void setRandomize(String value) {
+ Boolean val = new Boolean(value);
+ randomize = val.booleanValue();
+ }
+
+ /**
+ * Main function that must be implemented by the child class.
+ */
+ public abstract void layoutPartion(LayoutPartition partition);
+
+ protected void initialize_local() {
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param message DOCUMENT ME!
+ */
+ public static void debugln(String message) {
+ if (debug) {
+ System.err.println(message);
+ }
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param message DOCUMENT ME!
+ */
+ public static void debug(String message) {
+ if (debug) {
+ System.err.print(message);
+ }
+ }
+}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
2012-01-06 19:27:26 UTC (rev 27940)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
2012-01-06 20:51:41 UTC (rev 27941)
@@ -31,7 +31,6 @@
package csapps.layout.algorithms.bioLayout;
-import org.cytoscape.view.layout.AbstractLayoutAlgorithm;
import org.cytoscape.work.TaskIterator;
import org.cytoscape.work.Tunable;
import org.cytoscape.work.TunableValidator;
@@ -53,7 +52,7 @@
* @author <a href="mailto:[email protected]">Scooter Morris</a>
* @version 0.9
*/
-public class BioLayoutFRAlgorithm extends AbstractLayoutAlgorithm implements
TunableValidator {
+public class BioLayoutFRAlgorithm extends BioLayoutAlgorithm implements
TunableValidator {
/**
* Sets the number of iterations for each update
*/
@@ -127,7 +126,7 @@
networkView, getName(), selectedOnly,
staticNodes, update_iterations,
attraction_multiplier, repulsion_multiplier,
gravity_multiplier,
conflict_avoidance, max_distance_factor,
spread_factor,
- temperature, nIterations, supportWeights,
singlePartition));
+ temperature, nIterations, supportWeights,
singlePartition, randomize));
}
@Override // TODO
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
2012-01-06 19:27:26 UTC (rev 27940)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutFRAlgorithmTask.java
2012-01-06 20:51:41 UTC (rev 27941)
@@ -11,10 +11,9 @@
import org.cytoscape.view.layout.LayoutPartition;
import org.cytoscape.view.model.CyNetworkView;
import org.cytoscape.view.model.View;
-import org.cytoscape.work.Tunable;
-public class BioLayoutFRAlgorithmTask extends BioLayoutAlgorithm {
+public class BioLayoutFRAlgorithmTask extends BioLayoutAlgorithmTask {
/**
* Sets the number of iterations for each update
*/
@@ -118,9 +117,9 @@
int update_iterations, final double attraction_multiplier,final
double repulsion_multiplier,
final double gravity_multiplier,final double
conflict_avoidance, final double max_distance_factor,
final double spread_factor,final double temperature,final int
nIterations,
- final boolean supportWeights, final boolean singlePartition)
+ final boolean supportWeights, final boolean singlePartition,
final boolean randomize)
{
- super(networkView, name, selectedOnly, staticNodes,
singlePartition);
+ super(networkView, name, selectedOnly, staticNodes,
singlePartition, randomize);
this.update_iterations =update_iterations;
this.attraction_multiplier =attraction_multiplier;
@@ -431,7 +430,7 @@
if (debug) {
try {
-
Thread.currentThread().sleep(100);
+ Thread.sleep(100);
} catch (InterruptedException e) {
}
}
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
2012-01-06 19:27:26 UTC (rev 27940)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
2012-01-06 20:51:41 UTC (rev 27941)
@@ -31,7 +31,6 @@
*/
package csapps.layout.algorithms.bioLayout;
-import org.cytoscape.view.layout.AbstractLayoutAlgorithm;
import org.cytoscape.work.TaskIterator;
import org.cytoscape.work.Tunable;
import org.cytoscape.work.TunableValidator;
@@ -57,7 +56,7 @@
* @author <a href="mailto:[email protected]">Scooter Morris</a>
* @version 0.9
*/
-public class BioLayoutKKAlgorithm extends AbstractLayoutAlgorithm implements
TunableValidator {
+public class BioLayoutKKAlgorithm extends BioLayoutAlgorithm implements
TunableValidator {
/**
* The average number of iterations per Node
*/
@@ -67,13 +66,14 @@
public double m_nodeDistanceStrengthConstant=15.0;
@Tunable(description="Spring rest length")
public double m_nodeDistanceRestLengthConstant=45.0;
- //private double[] m_nodeDistanceSpringScalars;
@Tunable(description="Strength of a 'disconnected' spring")
public double m_disconnectedNodeDistanceSpringStrength=0.05;
@Tunable(description="Rest length of a 'disconnected' spring")
public double m_disconnectedNodeDistanceSpringRestLength=2000.0;
@Tunable(description="Strength to apply to avoid collisions")
public double m_anticollisionSpringStrength;
+ @Tunable(description="Number of layout passes")
+ public int m_layoutPass = 2;
@Tunable(description="Don't partition graph before layout",
groups="Standard settings")
public boolean singlePartition;
@@ -94,7 +94,7 @@
m_nodeDistanceRestLengthConstant,
m_disconnectedNodeDistanceSpringStrength,
m_disconnectedNodeDistanceSpringRestLength,
- m_anticollisionSpringStrength, supportWeights,
singlePartition));
+ m_anticollisionSpringStrength, supportWeights,
singlePartition, m_layoutPass, randomize));
}
@Override // TODO
Modified:
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
===================================================================
---
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
2012-01-06 19:27:26 UTC (rev 27940)
+++
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
2012-01-06 20:51:41 UTC (rev 27941)
@@ -15,13 +15,11 @@
import org.cytoscape.view.layout.LayoutPartition;
import org.cytoscape.view.model.CyNetworkView;
import org.cytoscape.view.model.View;
-import org.cytoscape.work.Tunable;
-import org.cytoscape.work.undo.UndoSupport;
import csapps.layout.Profile;
-public class BioLayoutKKAlgorithmTask extends BioLayoutAlgorithm {
+public class BioLayoutKKAlgorithmTask extends BioLayoutAlgorithmTask {
/**
* A small value used to avoid division by zero
@@ -31,25 +29,40 @@
/**
* The total number of layout passes
*/
- //@Tunable(description="Number of layout passes", groups="Algorithm
settings")
- public int m_numLayoutPasses = 10;
+ private int m_numLayoutPasses = 10;
/**
* The average number of iterations per Node
*/
- //@Tunable(description="Average number of iteratations for each node",
groups="Algorithm settings")
- public double m_averageIterationsPerNode = 40;
- //@Tunable(description="Spring strength", groups="Algorithm settings")
- public double m_nodeDistanceStrengthConstant=15.0;
- //@Tunable(description="Spring rest length", groups="Algorithm
settings")
- public double m_nodeDistanceRestLengthConstant=45.0;
+ private double m_averageIterationsPerNode = 40;
+
+ /**
+ * Spring strength
+ */
+ private double m_nodeDistanceStrengthConstant=15.0;
+
+ /**
+ * Spring rest length"
+ */
+ private double m_nodeDistanceRestLengthConstant=45.0;
+
private double[] m_nodeDistanceSpringScalars;
- //@Tunable(description="Strength of a 'disconnected' spring",
groups="Algorithm settings")
- public double m_disconnectedNodeDistanceSpringStrength=0.05;
- //@Tunable(description="Rest length of a 'disconnected' spring",
groups="Algorithm settings")
- public double m_disconnectedNodeDistanceSpringRestLength=2000.0;
- //@Tunable(description="Strength to apply to avoid collisions",
groups="Algorithm settings")
- public double m_anticollisionSpringStrength;
+
+ /**
+ * Strength of a 'disconnected' spring
+ */
+ private double m_disconnectedNodeDistanceSpringStrength=0.05;
+
+ /**
+ * Rest length of a 'disconnected' spring"
+ */
+ private double m_disconnectedNodeDistanceSpringRestLength=2000.0;
+
+ /**
+ * Strength to apply to avoid collisions
+ */
+ private double m_anticollisionSpringStrength;
+
private double[] m_anticollisionSpringScalars;
/**
@@ -61,8 +74,7 @@
/**
* Current layout pass
*/
- @Tunable(description="Number of layout passes", groups="Algorithm
settings")
- public int m_layoutPass = 2;
+ private int m_layoutPass = 2;
/**
* The number of nodes
@@ -93,9 +105,9 @@
final double m_disconnectedNodeDistanceSpringStrength,
final double m_disconnectedNodeDistanceSpringRestLength,
final double m_anticollisionSpringStrength,
- final boolean supportWeights, final boolean singlePartition)
+ final boolean supportWeights, final boolean singlePartition,
final int m_layoutPass, final boolean randomize)
{
- super(networkView, name, selectedOnly, staticNodes,
singlePartition);
+ super(networkView, name, selectedOnly, staticNodes,
singlePartition, randomize);
this.m_averageIterationsPerNode = m_averageIterationsPerNode;
this.m_nodeDistanceStrengthConstant =
m_nodeDistanceStrengthConstant;
this.m_nodeDistanceRestLengthConstant =
m_nodeDistanceRestLengthConstant;
@@ -103,7 +115,7 @@
this.m_disconnectedNodeDistanceSpringRestLength =
m_disconnectedNodeDistanceSpringRestLength;
this.m_anticollisionSpringStrength =
m_anticollisionSpringStrength;
this.supportWeights = supportWeights;
-
+ this.m_layoutPass = m_layoutPass;
}
/**
--
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.