/** * Return the next long in the local iterator. * Uses the local iterator, which is not thread-safe. Use getIndexIterator if you need thread-safety. * * @return next element as a long, same as IndexIterator.getLongNext(). */ public long nextLong() { return ii.getLongNext(); }
protected void copyTo1DJavaArray(IndexIterator iter, Object javaArray) { long[] ja = (long []) javaArray; for (int i=0; i<ja.length; i++) ja[i] = iter.getLongNext(); }
/** * Return the next long in the local iterator. * Uses the local iterator, which is not thread-safe. Use getIndexIterator if you need thread-safety. * * @return next element as a long, same as IndexIterator.getLongNext(). */ public long nextLong() { return ii.getLongNext(); }
/** * Return the next long in the local iterator. * Uses the local iterator, which is not thread-safe. Use getIndexIterator if you need thread-safety. * * @return next element as a long, same as IndexIterator.getLongNext(). */ public long nextLong() { return ii.getLongNext(); }
protected void copyTo1DJavaArray(IndexIterator iter, Object javaArray) { long[] ja = (long []) javaArray; for (int i=0; i<ja.length; i++) ja[i] = iter.getLongNext(); }
protected void copyTo1DJavaArray(IndexIterator iter, Object javaArray) { long[] ja = (long []) javaArray; for (int i=0; i<ja.length; i++) ja[i] = iter.getLongNext(); }
protected void copyLongs(int recnum, StructureMembers.Member m, IndexIterator result) { IndexIterator dataIter = getArray(recnum, m).getIndexIterator(); while (dataIter.hasNext()) result.setLongNext(dataIter.getLongNext()); }
protected void copyLongs(int recnum, StructureMembers.Member m, IndexIterator result) { IndexIterator dataIter = getArray(recnum, m).getIndexIterator(); while (dataIter.hasNext()) result.setLongNext(dataIter.getLongNext()); }
protected void copyLongs(int recnum, StructureMembers.Member m, IndexIterator result) { IndexIterator dataIter = getArray(recnum, m).getIndexIterator(); while (dataIter.hasNext()) result.setLongNext(dataIter.getLongNext()); }
/** * copy array a to array result as longs * The values from the array a are converted to long (if needed), * and then converted to the type of result (if needed). * @param result copy to here * @param a copy from here * * * @throws IllegalArgumentException a and result are not conformable */ public static void copyLong(Array result, Array a) throws IllegalArgumentException { if (!conformable(a, result)) throw new IllegalArgumentException("copy arrays are not conformable"); IndexIterator iterA = a.getIndexIterator(); IndexIterator iterR = result.getIndexIterator(); while (iterA.hasNext()) iterR.setLongNext(iterA.getLongNext()); }
/** * copy array a to array result as longs * The values from the array a are converted to long (if needed), * and then converted to the type of result (if needed). * @param result copy to here * @param a copy from here * * * @throws IllegalArgumentException a and result are not conformable */ public static void copyLong(Array result, Array a) throws IllegalArgumentException { if (!conformable(a, result)) throw new IllegalArgumentException("copy arrays are not conformable"); IndexIterator iterA = a.getIndexIterator(); IndexIterator iterR = result.getIndexIterator(); while (iterA.hasNext()) iterR.setLongNext(iterA.getLongNext()); }
/** * copy array a to array result as longs * The values from the array a are converted to long (if needed), * and then converted to the type of result (if needed). * @param result copy to here * @param a copy from here * * * @throws IllegalArgumentException a and result are not conformable */ public static void copyLong(Array result, Array a) throws IllegalArgumentException { if (!conformable(a, result)) throw new IllegalArgumentException("copy arrays are not conformable"); IndexIterator iterA = a.getIndexIterator(); IndexIterator iterR = result.getIndexIterator(); while (iterA.hasNext()) iterR.setLongNext(iterA.getLongNext()); }
private Array findReferenceObjectNames(Array data) throws IOException { //Array data = v.read(); IndexIterator ii = data.getIndexIterator(); Array newData = Array.factory(DataType.STRING, data.getShape()); IndexIterator ii2 = newData.getIndexIterator(); while (ii.hasNext()) { long objId = ii.getLongNext(); DataObject dobj = getDataObject(objId, null); if (dobj == null) log.error("readReferenceObjectNames cant find obj= " + objId); else { if (debugReference) System.out.println(" Referenced object= " + dobj.who); ii2.setObjectNext(dobj.who); } } return newData; }
private Array findReferenceObjectNames(Array data) throws IOException { //Array data = v.read(); IndexIterator ii = data.getIndexIterator(); Array newData = Array.factory(DataType.STRING, data.getShape()); IndexIterator ii2 = newData.getIndexIterator(); while (ii.hasNext()) { long objId = ii.getLongNext(); DataObject dobj = getDataObject(objId, null); if (dobj == null) log.warn("readReferenceObjectNames cant find obj= " + objId); else { if (debugReference) System.out.println(" Referenced object= " + dobj.who); ii2.setObjectNext(dobj.who); } } return newData; }
private Array findReferenceObjectNames(Array data) throws IOException { //Array data = v.read(); IndexIterator ii = data.getIndexIterator(); Array newData = Array.factory(DataType.STRING, data.getShape()); IndexIterator ii2 = newData.getIndexIterator(); while (ii.hasNext()) { long objId = ii.getLongNext(); DataObject dobj = getDataObject(objId, null); if (dobj == null) { log.warn("readReferenceObjectNames cant find obj= {}", objId); } else { if (debugReference) { log.debug(" Referenced object= {}", dobj.who); } ii2.setObjectNext(dobj.who); } } return newData; }
void copyArrayToBB(Array data, ByteBuffer out) { Class classType = data.getElementType(); IndexIterator iterA = data.getIndexIterator(); if (classType == double.class) { while (iterA.hasNext()) out.putDouble(iterA.getDoubleNext()); } else if (classType == float.class) { while (iterA.hasNext()) out.putFloat(iterA.getFloatNext()); } else if (classType == long.class) { while (iterA.hasNext()) out.putLong(iterA.getLongNext()); } else if (classType == int.class) { while (iterA.hasNext()) out.putInt(iterA.getIntNext()); } else if (classType == short.class) { while (iterA.hasNext()) out.putShort(iterA.getShortNext()); } else if (classType == char.class) { byte[] pa = IospHelper.convertCharToByte((char[]) data.get1DJavaArray(DataType.CHAR)); out.put(pa, 0, pa.length); } else if (classType == byte.class) { while (iterA.hasNext()) out.put(iterA.getByteNext()); } else throw new UnsupportedOperationException("Class type = " + classType.getName()); }
outStream.writeLong(iterA.getLongNext());
outStream.writeLong(iterA.getLongNext());
long val = it.getLongNext(); it.setLongCurrent( (long) ( val * elevVarUnitsConversionFactor ) );
long val = it.getLongNext(); it.setLongCurrent( (long) ( val * elevVarUnitsConversionFactor ) );