Package org.cytoscape.ClusterViz.internal.algorithm.Algorithm

Examples of org.cytoscape.ClusterViz.internal.algorithm.Algorithm.NodeInfo


            for (int j = 0; j < alEdgeWithSameWeight.size(); j++) {//for each edge
                Long edgeIndex = ((Long) alEdgeWithSameWeight.get(j)).longValue();
                curEdge=inputNetwork.getEdge(edgeIndex);               
            Long inFrom = curEdge.getSource().getSUID();
            Long inTo   = curEdge.getTarget().getSUID();
            NodeInfo fromNI=(NodeInfo)curNodeInfos.get(inFrom)//source node info
            NodeInfo toNI=(NodeInfo)curNodeInfos.get(inTo)//target node info
           
            int icFrom=fromNI.iComplex;  //complex that the source node belongs to
            int icTo=toNI.iComplex;    //complex that the target node belongs to
            if(icFrom != icTo)    //we have take some actions only if the two complexes are not the same
            {
View Full Code Here


        Long[] adjs=getNeighborArray(currentNetwork,nodeIndex);
        for(int j=0;j<adjs.length;j++)
          if(alNodes.contains(adjs[j]))
              inDegree++;
        alNodes.add(nodeIndex);
        NodeInfo node=(NodeInfo)curNodeInfos.get(nodeIndex);
        node.setComplex(c1.getResultId());
        //node.setComplex(c1.getComplexID());
      }
      c1.setInDegree(inDegree);
      c1.setTotalDegree(totalDegree);
      int outDegree=totalDegree-2*inDegree;
 
View Full Code Here

    protected void mergeComplexes2(Cluster c1,Cluster c2){
      List<Long> alNodes=c1.getALCluster();
      Iterator i=c2.getALCluster().iterator();
      while(i.hasNext()){
        Long nodeIndex=((Long)i.next()).longValue();
        NodeInfo node=(NodeInfo)curNodeInfos.get(new Long(nodeIndex));
        node.setComplex(c1.getResultId());
        alNodes.add(new Long(nodeIndex));
      }
      c2.getALCluster().clear();
      i=alNodes.iterator();
      c1.setModule(true);
View Full Code Here

     */
    protected void mergeComplexes3(Cluster c1, Cluster c2){
      List<Long> nodes1=c1.getALCluster();
      List<Long> nodes2=c2.getALCluster();
      //add the unoverlapped nodes and set the subComplexes of all nodes in C2
      NodeInfo nodeNI;
      ArrayList subComplexes;
      for(Iterator it=nodes2.iterator();it.hasNext();){//for each node in C2
        Long node=(Long)it.next();
        nodeNI=(NodeInfo)curNodeInfos.get(node);
        subComplexes=nodeNI.getAlComplex();
        if(!nodes1.contains(node)){//this is not a overlapped node
            int index=subComplexes.indexOf(new Integer(c2.getResultId()));
            subComplexes.remove(index);
            subComplexes.add(new Integer(c1.getResultId()));
          nodes1.add(node);
View Full Code Here

     */
    protected void mergeComplexes4(Cluster c1, Cluster c2){
      List<Long> nodes1=c1.getALCluster();
      List<Long> nodes2=c2.getALCluster();
      //add the unoverlapped nodes and set the subComplexes of all nodes in C2
      NodeInfo nodeNI;
      ArrayList subComplexes;
      for(Iterator it=nodes2.iterator();it.hasNext();){//for each node in C2
        Long node=(Long)it.next();
        nodeNI=(NodeInfo)curNodeInfos.get(node);
        subComplexes=nodeNI.getAlComplex();
        if(!nodes1.contains(node)){//this is not a overlapped node
            int index=subComplexes.indexOf(new Integer(c2.getResultId()));
            subComplexes.remove(index);
            subComplexes.add(new Integer(c1.getResultId()));
          nodes1.add(node);
View Full Code Here

TOP

Related Classes of org.cytoscape.ClusterViz.internal.algorithm.Algorithm.NodeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.