Package cleo.search.connection

Examples of cleo.search.connection.ConnectionFilter.accept()


    int count = rand.nextInt(10000) + 100;
    Range sourceRange = new Range(start, count);
    ConnectionFilter connFilter = new SourcePartitionConnectionFilter(sourceRange);
   
    Connection conn = new SimpleConnection(0, rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(start), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(start + rand.nextInt(count), rand.nextInt(), true);
View Full Code Here


   
    Connection conn = new SimpleConnection(0, rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(start), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(start + rand.nextInt(count), rand.nextInt(), true);
    assertEquals(true, connFilter.accept(conn));
   
    conn = new SimpleConnection(sourceRange.getEnd(), rand.nextInt(), true);
View Full Code Here

   
    conn = new SimpleConnection(rand.nextInt(start), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(start + rand.nextInt(count), rand.nextInt(), true);
    assertEquals(true, connFilter.accept(conn));
   
    conn = new SimpleConnection(sourceRange.getEnd(), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(sourceRange.getEnd() + rand.nextInt(count), rand.nextInt(), true);
View Full Code Here

   
    conn = new SimpleConnection(start + rand.nextInt(count), rand.nextInt(), true);
    assertEquals(true, connFilter.accept(conn));
   
    conn = new SimpleConnection(sourceRange.getEnd(), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(sourceRange.getEnd() + rand.nextInt(count), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
  }
 
View Full Code Here

   
    conn = new SimpleConnection(sourceRange.getEnd(), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(sourceRange.getEnd() + rand.nextInt(count), rand.nextInt(), true);
    assertEquals(false, connFilter.accept(conn));
  }
 
  public void testTargetPartitionConnectionFilter() {
    int start = rand.nextInt(10000) + 100;
    int count = rand.nextInt(10000) + 100;
View Full Code Here

    int count = rand.nextInt(10000) + 100;
    Range targetRange = new Range(start, count);
    ConnectionFilter connFilter = new TargetPartitionConnectionFilter(targetRange);
   
    Connection conn = new SimpleConnection(rand.nextInt(), 0, true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), rand.nextInt(start), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), start + rand.nextInt(count), true);
View Full Code Here

   
    Connection conn = new SimpleConnection(rand.nextInt(), 0, true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), rand.nextInt(start), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), start + rand.nextInt(count), true);
    assertEquals(true, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), targetRange.getEnd(), true);
View Full Code Here

   
    conn = new SimpleConnection(rand.nextInt(), rand.nextInt(start), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), start + rand.nextInt(count), true);
    assertEquals(true, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), targetRange.getEnd(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), targetRange.getEnd() + rand.nextInt(count), true);
View Full Code Here

   
    conn = new SimpleConnection(rand.nextInt(), start + rand.nextInt(count), true);
    assertEquals(true, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), targetRange.getEnd(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), targetRange.getEnd() + rand.nextInt(count), true);
    assertEquals(false, connFilter.accept(conn));
  }
 
View Full Code Here

   
    conn = new SimpleConnection(rand.nextInt(), targetRange.getEnd(), true);
    assertEquals(false, connFilter.accept(conn));
   
    conn = new SimpleConnection(rand.nextInt(), targetRange.getEnd() + rand.nextInt(count), true);
    assertEquals(false, connFilter.accept(conn));
  }
 
  public void testTransitivePartitionConnectionFilter() {
    Range range = new Range(3000, 1000); // [3000, 4000)
    ConnectionFilter connFilter = new TransitivePartitionConnectionFilter(range);
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.