Examples of elementCount()


Examples of mikera.arrayz.INDArray.elementCount()

    if (dims ==0) {
      data[offset]+=get();
    } else {
      int n=sliceCount();
      INDArray s0=slice(0);
      int ec=(int) s0.elementCount();
      s0.addToArray(data, offset);
      for (int i=1; i<n; i++) {
        slice(i).addToArray(data, offset+i*ec);
     
    }
 
View Full Code Here

Examples of mikera.arrayz.INDArray.elementCount()

    }
    int sc=sliceCount();
    for (int i=0; i<sc; i++) {
      INDArray s=slice(i);
      s.getElements(dest,offset);
      offset+=s.elementCount();
    }
  }
 
  @Override
  public void copyTo(double[] arr) {
View Full Code Here

Examples of mikera.arrayz.impl.IStridedArray.elementCount()

   
    int dims=m.dimensionality();
    int[] shape=m.getShape();
    int[] strides=m.getStrides();
   
    if (m.elementCount()==0) return;
   
    if (mm.isMutable()) {
      double[] data=m.getArray();
      for (int i=0; i<dims; i++) {
        assertEquals(m.getStride(i),strides[i]);
View Full Code Here

Examples of mikera.matrixx.impl.SparseRowMatrix.elementCount()

    return sm;
  }
 
  public static void main(String[] args) {
    SparseRowMatrix sm=createMatrix();
    System.out.println(sm.nonZeroCount() +" elements are non-zero out of " + sm.elementCount()+" total elements");
   
    AMatrix smm=sm.innerProduct(sm);
    System.out.println(smm.nonZeroCount() +" elements are non-zero in the product.");
  }
View Full Code Here

Examples of org.hsqldb.persist.PersistentStore.elementCount()

            case Index.INDEX_UNIQUE :
                if (operation == OpTypes.EQUAL) {
                    factor = 1;
                } else {
                    factor = store.elementCount() / 2.0;
                }
                break;

            case Index.INDEX_NON_UNIQUE :
                if (operation == OpTypes.EQUAL) {
View Full Code Here

Examples of org.hsqldb.persist.PersistentStore.elementCount()

                }
                break;

            case Index.INDEX_NON_UNIQUE :
                if (operation == OpTypes.EQUAL) {
                    factor = store.elementCount() / 8.0;

                    if (factor > 1024) {
                        factor = 1024;
                    }
                } else {
View Full Code Here

Examples of org.hsqldb.persist.PersistentStore.elementCount()

                    if (factor > 1024) {
                        factor = 1024;
                    }
                } else {
                    factor = store.elementCount() / 2.0;
                }
                break;

            case Index.INDEX_NONE :
            default :
View Full Code Here

Examples of org.hsqldb.persist.PersistentStore.elementCount()

                }
                break;

            case Index.INDEX_NONE :
            default :
                factor = store.elementCount();
                break;
        }

        return factor < Index.minimumSelectivity ? Index.minimumSelectivity
                                                 : factor;
View Full Code Here

Examples of org.hsqldb.persist.PersistentStore.elementCount()

                it = index.findFirstRow(session, store, data);

                if (opType == OpTypes.EQUAL) {
                    if (it.hasNext()) {
                        return store.elementCount(session) == 1 ? Boolean.TRUE
                                                                : Boolean
                                                                .FALSE;
                    } else {
                        return Boolean.FALSE;
                    }
View Full Code Here

Examples of org.hsqldb.persist.PersistentStore.elementCount()

            case OpTypes.MATCH_UNIQUE_FULL :
            case OpTypes.NOT_DISTINCT : {
                PersistentStore store =
                    rangeVar.rangeTable.getRowStore(session);

                cost = store.elementCount();

                if (cost < Index.minimumSelectivity) {
                    cost = Index.minimumSelectivity;
                }
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.