Examples of BaseVertex


Examples of org.drools.reteoo.BaseVertex

            if ( monitor.isCanceled() ) {
                throw new InterruptedException();
            }

            monitor.subTask( "Calculating RETE Tree Layout" );
            BaseVertex rootVertex = visitor.getRootVertex();
            RowList rowList = ReteooLayoutFactory.calculateReteRows( rootVertex );
            ReteooLayoutFactory.layoutRowList( newDiagram,
                                               rowList );
            zeroBaseDiagram( newDiagram );
            monitor.worked( 20 );
View Full Code Here

Examples of org.drools.reteoo.BaseVertex

        int delta = (x - (maxx - minx + 20)) / 2;
        minx = minx - (delta);

        final Iterator nodeIter2 = graph.getChildren().iterator();
        while ( nodeIter2.hasNext() ) {
            final BaseVertex vertex = (BaseVertex) (nodeIter2.next());
            Point loc = vertex.getLocation();
            vertex.setLocation( new Point( loc.x - minx,
                                           loc.y - miny ) );
        }
    }
View Full Code Here

Examples of org.drools.reteoo.BaseVertex

        Collections.sort( sorted,
                          new Comparator() {
                              public int compare(final Object o1,
                                                 final Object o2) {
                                  final BaseVertex v1 = (BaseVertex) o1;
                                  final BaseVertex v2 = (BaseVertex) o2;

                                  int v1OutDegree = v1.getSourceConnections().size();
                                  int v2OutDegree = v2.getSourceConnections().size();

                                  if ( v1OutDegree < v2OutDegree ) {
                                      return 1;
                                  }

                                  if ( v1OutDegree > v2OutDegree ) {
                                      return -1;
                                  }

                                  return 0;
                              }
                          } );

        final LinkedList optimized = new LinkedList();

        boolean front = false;

        for ( final Iterator vertexIter = sorted.iterator(); vertexIter.hasNext(); ) {
            final BaseVertex vertex = (BaseVertex) vertexIter.next();

            if ( front ) {
                optimized.addFirst( vertex );
            } else {
                optimized.addLast( vertex );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.