Examples of DoubleComparator


Examples of org.apache.hadoop.hbase.filter.DoubleComparator

    HTable table = new HTable(conf, userTableName);
    rangePutForIdx2WithDouble(table);
    FilterList masterFilter = new FilterList(Operator.MUST_PASS_ALL);
    SingleColumnValueFilter scvf =
        new SingleColumnValueFilter("cf1".getBytes(), "c1".getBytes(), CompareOp.GREATER_OR_EQUAL,
            new DoubleComparator(Bytes.toBytes(-5.3d)));
    masterFilter.addFilter(scvf);
    Scan scan = new Scan();
    scan.setFilter(masterFilter);
    ResultScanner scanner = table.getScanner(scan);
    List<Result> testRes = new ArrayList<Result>();
View Full Code Here

Examples of org.apache.mahout.math.function.DoubleComparator

    }
  }
 
  @Test
  public void testQuickSortDoubles() {
    DoubleComparator revComp = new DoubleComparator() {
     
      @Override
      public int compare(double o1, double o2) {
        if (o2 < o1) {
          return -1;
View Full Code Here

Examples of org.apache.mahout.math.function.DoubleComparator

    Sorting.mergeSort(stuff, 100, stuff.length);
    for (int x = 100; x < (stuff.length - 1); x++) {
      assertTrue(stuff[x] <= stuff[x + 1]);
    }
   
    DoubleComparator revComp = new DoubleComparator() {
     
      @Override
      public int compare(double o1, double o2) {
        if (o2 < o1) {
          return -1;
View Full Code Here

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator

    public void testBox()
    {
        graph.makeEdgeChain( "a,b,c,d,a" );
        NetworkRadius<Double> radius = new NetworkRadius<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( radius.getCentrality( null ) == 2.0 );
    }
View Full Code Here

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator

    {
        graph.makeEdgeChain( "a,b,c" );
        graph.makeEdgeChain( "d,b,e" );
        NetworkRadius<Double> radius = new NetworkRadius<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( radius.getCentrality( null ) == 1.0 );
    }
View Full Code Here

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator

    public void testChain()
    {
        graph.makeEdgeChain( "a,b,c,d,e" );
        NetworkRadius<Double> radius = new NetworkRadius<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( radius.getCentrality( null ) == 2.0 );
    }
View Full Code Here

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator

    public void testBox()
    {
        graph.makeEdgeChain( "a,b,c,d,a" );
        NetworkDiameter<Double> diameter = new NetworkDiameter<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( diameter.getCentrality( null ) == 2.0 );
    }
View Full Code Here

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator

    {
        graph.makeEdgeChain( "a,b,c" );
        graph.makeEdgeChain( "d,b,e" );
        NetworkDiameter<Double> diameter = new NetworkDiameter<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( diameter.getCentrality( null ) == 2.0 );
    }
View Full Code Here

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator

    public void testChain()
    {
        graph.makeEdgeChain( "a,b,c,d,e" );
        NetworkDiameter<Double> diameter = new NetworkDiameter<Double>(
            getSingleSourceShortestPath(), 0.0, graph.getAllNodes(),
            new DoubleComparator() );
        assertTrue( diameter.getCentrality( null ) == 4.0 );
    }
View Full Code Here

Examples of org.neo4j.graphalgo.impl.util.DoubleComparator

                public Double getCost( Relationship relationship,
                    Direction direction )
                {
                    return 1.0;
                }
            }, new DoubleAdder(), new DoubleComparator(), Direction.OUTGOING,
            MyRelTypes.R1 );
        // path discovery flags
        boolean pathBD = false;
        boolean pathB2D = false;
        boolean pathBD2 = false;
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.