Author: paperwing
Date: 2012-07-04 13:46:53 -0700 (Wed, 04 Jul 2012)
New Revision: 29760

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/BioLayoutKKContext.java
Log:
refs #1204 Edge-weighted Spring Embedded layout now has option to use 
unweighted edges

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-07-04 20:37:13 UTC (rev 29759)
+++ 
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java
       2012-07-04 20:46:53 UTC (rev 29760)
@@ -547,8 +547,8 @@
                for (LayoutEdge edge: partition.getEdgeList()) {
                        int node_i = edge.getSource().getIndex();
                        int node_j = edge.getTarget().getIndex();
-                       double weight = edge.getWeight();
-
+                       double weight = context.unweighted ? 
edgeWeighter.defaultEdgeWeight : edge.getWeight();
+                       
                        // System.out.println(edge);
                        if (nodeDistances[node_i][node_j] != Integer.MAX_VALUE) 
{
                                // Compute spring rest lengths.

Modified: 
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKContext.java
===================================================================
--- 
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKContext.java
     2012-07-04 20:37:13 UTC (rev 29759)
+++ 
core3/impl/trunk/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKContext.java
     2012-07-04 20:46:53 UTC (rev 29760)
@@ -23,7 +23,8 @@
        public int m_layoutPass = 2;
        @Tunable(description="Don't partition graph before layout", 
groups="Standard settings")
        public boolean singlePartition;
-
+       @Tunable(description="Use unweighted edges", groups="Standard settings")
+       public boolean unweighted;
        @Override // TODO
        public ValidationState getValidationState(final Appendable errMsg) {
                return ValidationState.OK;

-- 
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.

Reply via email to