Examples of IntComparator


Examples of cern.colt.function.IntComparator

*/
public ObjectMatrix1D sort(final ObjectMatrix1D vector) {
  int[] indexes = new int[vector.size()]; // row indexes to reorder instead of matrix itself
  for (int i=indexes.length; --i >= 0; ) indexes[i] = i;

  IntComparator comp = new IntComparator() { 
    public int compare(int a, int b) {
      Comparable av = (Comparable) (vector.getQuick(a));
      Comparable bv = (Comparable) (vector.getQuick(b));
      int r = av.compareTo(bv);
      return r<0 ? -1 : (r>0 ? 1 : 0);
View Full Code Here

Examples of co.nubetech.crux.server.filter.types.IntComparator

      byte[] valueBytes = BytesHelper.getBytes(aliasType, value);
      comparator = new LongComparator(valueBytes, offset, length);     
    }
    else if (aliasType.equals("java.lang.Integer")) {
      byte[] valueBytes = BytesHelper.getBytes(aliasType, value);
      comparator = new IntComparator(valueBytes, offset, length);
    }
    else if (aliasType.equals("java.lang.Double")) {
      byte[] valueBytes = BytesHelper.getBytes(aliasType, value);
      comparator = new DoubleComparator(valueBytes, offset, length);
    }
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.IntComparator

    pathSpec.setOrderBy(FacetSortSpec.OrderByCustom);
    pathSpec.setCustomComparatorFactory(new ComparatorFactory(){

      public IntComparator newComparator(
          FieldValueAccessor fieldValueAccessor, final int[] counts) {
        return new IntComparator(){

          public int compare(Integer f1, Integer f2) {
            int val = counts[f2] - counts[f1];
            if (val==0)
                {
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.IntComparator

    numberSpec.setCustomComparatorFactory(new ComparatorFactory() {
     
      public IntComparator newComparator(final FieldValueAccessor fieldValueAccessor,
          final int[] counts) {
       
        return new IntComparator(){

          public int compare(Integer v1, Integer v2) {
            Integer size1 = (Integer)fieldValueAccessor.getRawValue(v1);
            Integer size2 = (Integer)fieldValueAccessor.getRawValue(v2);
           
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.IntComparator

    pathSpec.setCustomComparatorFactory(new ComparatorFactory() {

      @Override
      public IntComparator newComparator(FieldValueAccessor fieldValueAccessor,
          final BigSegmentedArray counts) {
        return new IntComparator() {

          @Override
          public int compare(Integer f1, Integer f2) {
            int val = counts.get(f2) - counts.get(f1);
            if (val == 0) {
View Full Code Here

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.IntComparator

      @Override
      public IntComparator newComparator(final FieldValueAccessor fieldValueAccessor,
          final BigSegmentedArray counts) {

        return new IntComparator() {

          @Override
          public int compare(Integer v1, Integer v2) {
            Integer size1 = (Integer) fieldValueAccessor.getRawValue(v1);
            Integer size2 = (Integer) fieldValueAccessor.getRawValue(v2);
View Full Code Here

Examples of eu.stratosphere.api.common.typeutils.base.IntComparator

  @Override
  protected TupleComparator<Tuple3<Integer, String, Double>> createComparator(boolean ascending) {
    return new TupleComparator<Tuple3<Integer, String, Double>>(
        new int[]{0, 1, 2},
        new TypeComparator[]{
          new IntComparator(ascending),
          new StringComparator(ascending),
          new DoubleComparator(ascending)
        },
    new TypeSerializer[]{ IntSerializer.INSTANCE, StringSerializer.INSTANCE, DoubleSerializer.INSTANCE });
  }
View Full Code Here

Examples of org.apache.directory.mavibot.btree.comparator.IntComparator

    /**
     * Create a new instance of IntSerializer
     */
    public IntSerializer()
    {
        super( new IntComparator() );
    }
View Full Code Here

Examples of org.apache.flink.api.common.typeutils.base.IntComparator

  @Override
  protected TupleComparator<Tuple3<Integer, String, Double>> createComparator(boolean ascending) {
    return new TupleComparator<Tuple3<Integer, String, Double>>(
        new int[]{0, 1},
        new TypeComparator[]{
          new IntComparator(ascending),
          new StringComparator(ascending)
        },
    new TypeSerializer[]{ IntSerializer.INSTANCE, StringSerializer.INSTANCE, DoubleSerializer.INSTANCE });
  }
View Full Code Here

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

    HTable table = new HTable(conf, userTableName);
    rangePutForIdx2WithInteger(table);
    FilterList masterFilter = new FilterList(Operator.MUST_PASS_ALL);
    SingleColumnValueFilter scvf =
        new SingleColumnValueFilter("cf1".getBytes(), "c1".getBytes(), CompareOp.GREATER,
            new IntComparator(Bytes.toBytes(-6)));
    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
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.