Tabnine Logo
ArrayLong.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
ucar.ma2.ArrayLong
constructor

Best Java code snippets using ucar.ma2.ArrayLong.<init> (Showing top 7 results out of 315)

origin: edu.ucar/netcdf

static ArrayLong factory( Index index, long [] storage) {
 switch (index.getRank()) {
  case 0 : return new ArrayLong.D0(index, storage);
  case 1 : return new ArrayLong.D1(index, storage);
  case 2 : return new ArrayLong.D2(index, storage);
  case 3 : return new ArrayLong.D3(index, storage);
  case 4 : return new ArrayLong.D4(index, storage);
  case 5 : return new ArrayLong.D5(index, storage);
  case 6 : return new ArrayLong.D6(index, storage);
  case 7 : return new ArrayLong.D7(index, storage);
  default : return new ArrayLong(index, storage);
 }
}
origin: edu.ucar/cdm

static ArrayLong factory( Index index, long [] storage) {
 switch (index.getRank()) {
  case 0 : return new ArrayLong.D0(index, storage);
  case 1 : return new ArrayLong.D1(index, storage);
  case 2 : return new ArrayLong.D2(index, storage);
  case 3 : return new ArrayLong.D3(index, storage);
  case 4 : return new ArrayLong.D4(index, storage);
  case 5 : return new ArrayLong.D5(index, storage);
  case 6 : return new ArrayLong.D6(index, storage);
  case 7 : return new ArrayLong.D7(index, storage);
  default : return new ArrayLong(index, storage);
 }
}
origin: Unidata/thredds

static ArrayLong factory( Index index, boolean isUnsigned, long [] storage) {
  if (index instanceof Index0D) {
    return new ArrayLong.D0(index, isUnsigned, storage);
  } else if (index instanceof Index1D) {
    return new ArrayLong.D1(index, isUnsigned, storage);
  } else if (index instanceof Index2D) {
    return new ArrayLong.D2(index, isUnsigned, storage);
  } else if (index instanceof Index3D) {
    return new ArrayLong.D3(index, isUnsigned, storage);
  } else if (index instanceof Index4D) {
    return new ArrayLong.D4(index, isUnsigned, storage);
  } else if (index instanceof Index5D) {
    return new ArrayLong.D5(index, isUnsigned, storage);
  } else if (index instanceof Index6D) {
    return new ArrayLong.D6(index, isUnsigned, storage);
  } else if (index instanceof Index7D) {
    return new ArrayLong.D7(index, isUnsigned, storage);
  } else {
    return new ArrayLong(index, isUnsigned, storage);
  }
}
origin: edu.ucar/netcdf

/**
 * Generate new Array with given type and shape and an Index that always return 0.
 *
 * @param classType element Class type, eg double.class.
 * @param shape     shape of the array.
 * @param storage   primitive array of correct type of length 1
 * @return new Array<type> or Array<type>.D<rank> if 0 <= rank <= 7.
 */
static public Array factoryConstant(Class classType, int[] shape, Object storage) {
 Index index = new IndexConstant(shape);
 if ((classType == double.class) || (classType == Double.class))
  return new ArrayDouble(index, (double[]) storage);
 else if ((classType == float.class) || (classType == Float.class))
  return new ArrayFloat(index, (float[]) storage);
 else if ((classType == long.class) || (classType == Long.class))
  return new ArrayLong(index, (long[]) storage);
 else if ((classType == int.class) || (classType == Integer.class))
  return new ArrayInt(index, (int[]) storage);
 else if ((classType == short.class) || (classType == Short.class))
  return new ArrayShort(index, (short[]) storage);
 else if ((classType == byte.class) || (classType == Byte.class))
  return new ArrayByte(index, (byte[]) storage);
 else if ((classType == char.class) || (classType == Character.class))
  return new ArrayChar(index, (char[]) storage);
 else if ((classType == boolean.class) || (classType == Boolean.class))
  return new ArrayBoolean(index, (boolean[]) storage);
 else
  return new ArrayObject(classType, index, (Object[]) storage);
}
origin: edu.ucar/cdm

/**
 * Generate new Array with given type and shape and an Index that always return 0.
 *
 * @param classType element Class type, eg double.class.
 * @param shape     shape of the array.
 * @param storage   primitive array of correct type of length 1
 * @return new Array<type> or Array<type>.D<rank> if 0 <= rank <= 7.
 */
static public Array factoryConstant(Class classType, int[] shape, Object storage) {
 Index index = new IndexConstant(shape);
 if ((classType == double.class) || (classType == Double.class))
  return new ArrayDouble(index, (double[]) storage);
 else if ((classType == float.class) || (classType == Float.class))
  return new ArrayFloat(index, (float[]) storage);
 else if ((classType == long.class) || (classType == Long.class))
  return new ArrayLong(index, (long[]) storage);
 else if ((classType == int.class) || (classType == Integer.class))
  return new ArrayInt(index, (int[]) storage);
 else if ((classType == short.class) || (classType == Short.class))
  return new ArrayShort(index, (short[]) storage);
 else if ((classType == byte.class) || (classType == Byte.class))
  return new ArrayByte(index, (byte[]) storage);
 else if ((classType == char.class) || (classType == Character.class))
  return new ArrayChar(index, (char[]) storage);
 else if ((classType == boolean.class) || (classType == Boolean.class))
  return new ArrayBoolean(index, (boolean[]) storage);
 else
  return new ArrayObject(classType, index, (Object[]) storage);
}
origin: Unidata/thredds

 return new ArrayInt(index, false, (int[]) storage);
case LONG:
 return new ArrayLong(index, false, (long[]) storage);
case FLOAT:
 return new ArrayFloat(index, (float[]) storage);
 return new ArrayInt(index, true, (int[]) storage);
case ULONG:
 return new ArrayLong(index, true, (long[]) storage);
origin: Unidata/thredds

 public void testConvert() {
 int [] shape = new int[1];
 shape[0] = 10;
 Array A = new ArrayDouble(shape);
 convert(A, false);
 //castObject(A);
 A = new ArrayFloat(shape);
 convert(A, false);
 //castObject(A);
 A = new ArrayLong(shape, false);
 convert(A, false);
 //castObject(A);
 A = new ArrayInt(shape, false);
 convert(A, false);
 //castObject(A);
 A = new ArrayShort(shape, false);
 convert(A, false);
 //castObject(A);
 A = new ArrayByte(shape, false);
 convert(A, false);
 //castObject(A);
 A = new ArrayChar(shape);
 convert(A, false);
 //castObject(A);
 A = new ArrayBoolean(shape);
 convert(A, true);
 //castObject(A);
}
ucar.ma2ArrayLong<init>

Javadoc

Create a new Array using the given IndexArray and backing store. used for sections. Trusted package private.

Popular methods of ArrayLong

  • factory
  • get1DJavaArray
  • getLong
  • getSize
  • getDataAsByteBuffer
  • getDataType
  • isUnsigned

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now