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

How to use
ucar.ma2.ArrayBoolean
constructor

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

origin: edu.ucar/netcdf

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

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

static ArrayBoolean factory( Index index, boolean [] storage) {
  if (index instanceof Index0D) {
    return new ArrayBoolean.D0(index, storage);
  } else if (index instanceof Index1D) {
    return new ArrayBoolean.D1(index, storage);
  } else if (index instanceof Index2D) {
    return new ArrayBoolean.D2(index, storage);
  } else if (index instanceof Index3D) {
    return new ArrayBoolean.D3(index, storage);
  } else if (index instanceof Index4D) {
    return new ArrayBoolean.D4(index, storage);
  } else if (index instanceof Index5D) {
    return new ArrayBoolean.D5(index, storage);
  } else if (index instanceof Index6D) {
    return new ArrayBoolean.D6(index, storage);
  } else if (index instanceof Index7D) {
    return new ArrayBoolean.D7(index, storage);
  } else {
    return new ArrayBoolean(index, 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 ArrayBoolean(index, (boolean[]) storage);
case BYTE:
 return new ArrayByte(index, false, (byte[]) 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.ma2ArrayBoolean<init>

Javadoc

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

Popular methods of ArrayBoolean

  • factory
  • getBoolean

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • addToBackStack (FragmentTransaction)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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