本文整理了Java中ucar.ma2.Index.set1()
方法的一些代码示例,展示了Index.set1()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Index.set1()
方法的具体详情如下:
包路径:ucar.ma2.Index
类名称:Index
方法名:set1
[英]set current element at dimension 1 to v
[中]将维度1处的当前元素设置为v
代码示例来源:origin: Unidata/thredds
public void testRegular() {
System.out.println("testString: testRegular");
// read
for (i=0; i<m; i++) {
ima.set0(i);
for (j=0; j<n; j++) {
ima.set1(j);
char val = A.getChar(ima);
assert (val == 'a');
}
}
}
代码示例来源:origin: Unidata/thredds
public void setUp() {
// write
for (i=0; i<m; i++) {
ima.set0(i);
for (j=0; j<n; j++) {
ima.set1(j);
A.setChar(ima, 'a');
}
}
}
代码示例来源:origin: Unidata/thredds
void transfer(Array slice, int k) {
Index ima = work.getIndex();
ima.set1(k); // this one stays fixed
int count = 0;
IndexIterator ii = slice.getIndexIterator();
while (ii.hasNext()) {
work.setDouble(ima.set0(count), ii.getDoubleNext());
count++;
}
}
代码示例来源:origin: edu.ucar/netcdf4
void transfer(Array slice, int k) {
Index ima = work.getIndex();
ima.set1(k); // this one stays fixed
int count = 0;
IndexIterator ii = slice.getIndexIterator();
while (ii.hasNext()) {
work.setDouble(ima.set0(count), ii.getDoubleNext());
count++;
}
}
代码示例来源:origin: edu.ucar/netcdf
void transfer(Array slice, int k) {
Index ima = work.getIndex();
ima.set1(k); // this one stays fixed
int count = 0;
IndexIterator ii = slice.getIndexIterator();
while (ii.hasNext()) {
work.setDouble(ima.set0(count), ii.getDoubleNext());
count++;
}
}
代码示例来源:origin: Unidata/thredds
public void testGetPut() {
System.out.println("test Set/Get: seti()");
// read
for (i=0; i<m; i++) {
ima.set0(i);
for (j=0; j<n; j++) {
ima.set1(j);
for (k=0; k<p; k++) {
double val = A.getDouble(ima.set2(k));
assert (val == i*1000000+j*1000+k);
}
}
}
}
代码示例来源:origin: Unidata/thredds
public void setUp() {
// write
int count = 0;
for (i=0; i<m; i++) {
ima.set0(i);
for (j=0; j<n; j++) {
ima.set1(j);
for (k=0; k<p; k++) {
A.setDouble(ima.set2(k), (double) (count++));
}
}
}
}
代码示例来源:origin: Unidata/thredds
public void setUp() {
// write
for (i=0; i<m; i++) {
ima.set0(i);
for (j=0; j<n; j++) {
ima.set1(j);
for (k=0; k<p; k++) {
A.setDouble(ima.set2(k), (double) (i*1000000+j*1000+k));
}
}
}
}
代码示例来源:origin: Unidata/thredds
@Before
public void setUp() {
ima = A.getIndex();
// write
for (int i=0; i<m; i++) {
ima.set0(i);
for (j=0; j<n; j++) {
ima.set1(j);
for (k=0; k<p; k++) {
ima.set2(k);
A.setDouble(ima, (double) (i*100+j*10+k));
}
}
}
}
代码示例来源:origin: Unidata/thredds
for (int i = 0; i < n; i++) {
ima.set0(i);
value1[i] = data.getDouble(ima.set1(0));
value2[i] = data.getDouble(ima.set1(1));
代码示例来源:origin: edu.ucar/cdm
for (int i = 0; i < n; i++) {
ima.set0(i);
value1[i] = data.getDouble(ima.set1(0));
value2[i] = data.getDouble(ima.set1(1));
代码示例来源:origin: edu.ucar/netcdf
for (int i = 0; i < n; i++) {
ima.set0(i);
value1[i] = data.getDouble(ima.set1(0));
value2[i] = data.getDouble(ima.set1(1));
代码示例来源:origin: Unidata/thredds
public void setUp() throws InvalidRangeException {
Index ima = A.getIndex();
// write
for (i=0; i<m; i++) {
ima.set0(i);
for (j=0; j<n; j++) {
ima.set1(j);
for (k=0; k<p; k++) {
ima.set2(k);
A.setDouble(ima, (double) (i*100+j*10+k));
}
}
}
// section
secA = (ArrayDouble) A.section( new Section(m1+":"+m2+",:,:").getRanges() );
}
代码示例来源:origin: Unidata/thredds
double lat = latData.getDouble( latlonIndex.set1(i));
double lon = lonData.getDouble( latlonIndex);
latlon.set( lat, lon);
代码示例来源:origin: edu.ucar/netcdf
double lat = latData.getDouble( latlonIndex.set1(i));
double lon = lonData.getDouble( latlonIndex);
latlon.set( lat, lon);
代码示例来源:origin: edu.ucar/cdm
double lat = latData.getDouble( latlonIndex.set1(i));
double lon = lonData.getDouble( latlonIndex);
latlon.set( lat, lon);
内容来源于网络,如有侵权,请联系作者删除!