org.apache.sis.math.Vector.set()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.apache.sis.math.Vector.set()方法的一些代码示例,展示了Vector.set()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector.set()方法的具体详情如下:
包路径:org.apache.sis.math.Vector
类名称:Vector
方法名:set

Vector.set介绍

暂无

代码示例

代码示例来源:origin: apache/sis

/** Delegates to the enclosing vector. */
@Override public Number set(final int i, final Number v) {
  final Number old = Vector.this.set(indices[i], v);
  modCount++;
  return old;
}

代码示例来源:origin: org.apache.sis.core/sis-utility

/** Delegates to the enclosing vector. */
@Override public Number set(final int i, final Number v) {
  final Number old = Vector.this.set(indices[i], v);
  modCount++;
  return old;
}

代码示例来源:origin: org.apache.sis.core/sis-utility

/**
 * Sets the value at the given index.
 */
@Override
public Number set(int index, final Number value) {
  final Vector v;
  if (index < limit) {
    v = first;
  } else {
    v = second;
    index -= limit;
  }
  final Number old = v.set(index, value);
  modCount++;
  return old;
}

代码示例来源:origin: apache/sis

/**
 * Sets the value at the given index.
 */
@Override
public Number set(int index, final Number value) {
  final Vector v;
  if (index < limit) {
    v = first;
  } else {
    v = second;
    index -= limit;
  }
  final Number old = v.set(index, value);
  modCount++;
  return old;
}

代码示例来源:origin: apache/sis

/** Delegates to the enclosing vector. */
@Override public Number set(final int index, final Number v) {
  final Number old = Vector.this.set(toBacking(index), v);
  modCount++;
  return old;
}

代码示例来源:origin: org.apache.sis.core/sis-utility

/** Delegates to the enclosing vector. */
@Override public Number set(final int index, final Number v) {
  final Number old = Vector.this.set(toBacking(index), v);
  modCount++;
  return old;
}

代码示例来源:origin: apache/sis

/**
 * Computes the minimal or maximal values of the given vector. Those vectors do not need to have the same length.
 * One of those two vector will be modified in-place.
 *
 * @param  a    the first vector, or {@code null} if none.
 * @param  b    the new vector to combine with the existing one. Can not be null.
 * @param  max  {@code true} for computing the maximal values, or {@code false} for the minimal value.
 */
private static Vector extremum(Vector a, Vector b, final boolean max) {
  if (a != null) {
    int s = b.size();
    int i = a.size();
    if (i > s) {                            // If a vector is longer than b, swap a and b.
      i = s;
      final Vector t = a; a = b; b = t;
    }
    while (--i >= 0) {                      // At this point, 'b' shall be the longest vector.
      final double va = a.doubleValue(i);
      final double vb = b.doubleValue(i);
      if (Double.isNaN(vb) || (max ? va > vb : va < vb)) {
        b.set(i, va);
      }
    }
  }
  return b;
}

相关文章