congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ArrayByte$D1
Code IndexAdd Tabnine to your IDE (free)

How to use
ArrayByte$D1
in
ucar.ma2

Best Java code snippets using ucar.ma2.ArrayByte$D1 (Showing top 14 results out of 315)

origin: geotools/geotools

  return new ArrayDouble.D1(dimensions[0]);
} else if (varDataType == DataType.BYTE) {
  return new ArrayByte.D1(dimensions[0]);
} else if (varDataType == DataType.SHORT) {
  return new ArrayShort.D1(dimensions[0]);
origin: Unidata/thredds

ArrayByte.D1 barray = new ArrayByte.D1(latDim.getLength(), false);
int start = -latDim.getLength() / 2;
for (j = 0; j < latDim.getLength(); j++)
 barray.setByte(j, (byte) (start + j));
origin: Unidata/thredds

ArrayByte.D1 barray = new ArrayByte.D1(latDim.getLength(), false);
int start = -latDim.getLength() / 2;
for (j = 0; j < latDim.getLength(); j++)
 barray.setByte(j, (byte) (start + j));
origin: org.geotools/gt-netcdf

  return new ArrayDouble.D1(dimensions[0]);
} else if (varDataType == DataType.BYTE) {
  return new ArrayByte.D1(dimensions[0]);
} else if (varDataType == DataType.SHORT) {
  return new ArrayShort.D1(dimensions[0]);
origin: Unidata/thredds

ArrayByte.D1 ab = (ArrayByte.D1) a;
for (int i=0; i<25; i++) {
 byte valb = ab.get(i);
 assert (valb == i);
origin: Unidata/thredds

shape = v.getShape();
int len = shape[0];
ArrayByte.D1 barray = new ArrayByte.D1(len, false);
int start = -len / 2;
for (j = 0; j < len; j++)
 barray.setByte(j, (byte) (start + j));
origin: Unidata/thredds

ArrayByte.D1 missing_values = new ArrayByte.D1(2, true);
missing_values.set(0, (byte) 0);
missing_values.set(1, (byte) -127);
datav.addAttribute(new Attribute(CDM.MISSING_VALUE, missing_values));
origin: edu.ucar/cdm

ArrayByte.D1 missing_values = new ArrayByte.D1(2);
missing_values.set(0, (byte) 0);
missing_values.set(1, (byte) -127);
datav.addAttribute( new Attribute("missing_values", missing_values));
datav.setUnsigned(true);
origin: Unidata/thredds

@Test
public void testStrides() throws IOException {
 DODSNetcdfFile dodsfile = TestDODSRead.open("test.02");
 DODSVariable v = null;
 Array a = null;
 // byte
 assert(null != (v = (DODSVariable) dodsfile.findVariable("b")));
 assert v.getShortName().equals("b");
 assert v.getRank() == 1;
 assert v.getSize() == 25;
 assert v.getDataType() == DataType.UBYTE;
 try {
  a = v.read( "0:24:3" );
 } catch (InvalidRangeException e) {
   assert false;
 }
 assert a.getRank() == 1;
 assert a.getSize() == 9 : a.getSize();
 assert a.getElementType() == byte.class;
 assert a instanceof ArrayByte.D1;
 ArrayByte.D1 ab = (ArrayByte.D1) a;
 for (int i = 0; i < 8; i++) {
  byte valb = ab.get(i);
  assert(valb == 3*i);
 }
 //System.out.println("TestDODSArrayPrimitiveTypes TestStride ok");
}
origin: edu.ucar/netcdf

ArrayByte.D1 missing_values = new ArrayByte.D1(2);
missing_values.set(0, (byte) 0);
missing_values.set(1, (byte) -127);
datav.addAttribute( new Attribute("missing_values", missing_values));
datav.addAttribute( new Attribute(CDM.UNSIGNED, "true"));
origin: edu.ucar/cdm

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

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

@Test
public void testScalarReadByte() throws IOException {
 Variable v = null;
 Array a = null;
 assert null != (v = dodsfile.findVariable("types"));
 v.setCaching(false);
 assert v instanceof Structure;
 Structure s = (Structure) v;
 assert (null != (v = s.findVariable("b")));
 assert v.getShortName().equals("b");
 assert v.getRank() == 0;
 assert v.getSize() == 1;
 assert v.getDataType() == DataType.UBYTE;
 // note this reads all 10 bytes
 a = v.read();
 assert a.getRank() == 1;
 assert a.getSize() == 10;
 assert a.getElementType() == byte.class;
 assert a instanceof ArrayByte.D1;
 byte valb = ((ArrayByte.D1) a).get(0);
 assert (valb == 0);
}
origin: Unidata/thredds

static ArrayByte factory( Index index, boolean isUnsigned, byte [] storage) {
 if (index instanceof Index0D) {
  return new ArrayByte.D0(index, isUnsigned, storage);
 } else if (index instanceof Index1D) {
  return new ArrayByte.D1(index, isUnsigned, storage);
 } else if (index instanceof Index2D) {
  return new ArrayByte.D2(index, isUnsigned, storage);
 } else if (index instanceof Index3D) {
  return new ArrayByte.D3(index, isUnsigned, storage);
 } else if (index instanceof Index4D) {
  return new ArrayByte.D4(index, isUnsigned, storage);
 } else if (index instanceof Index5D) {
  return new ArrayByte.D5(index, isUnsigned, storage);
 } else if (index instanceof Index6D) {
  return new ArrayByte.D6(index, isUnsigned, storage);
 } else if (index instanceof Index7D) {
  return new ArrayByte.D7(index, isUnsigned, storage);
 } else {
  return new ArrayByte(index, isUnsigned, storage);
 }
}
ucar.ma2ArrayByte$D1

Javadoc

Concrete implementation of Array specialized for byte, rank 1.

Most used methods

  • <init>
  • set
  • get
  • setByte

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • From CI to AI: The AI layer in your organization
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