Beispiel #1
0
  @Override
  public Matrix toColumnMatrix() {
    Matrix result = Basic2DMatrix.zero(length, 1);

    for (int i = 0; i < length; i++) {
      result.set(i, 0, get(i));
    }

    return result;
  }
Beispiel #2
0
  @Override
  public Matrix toDiagonalMatrix() {
    Matrix result = Basic2DMatrix.zero(length, length);

    for (int i = 0; i < length; i++) {
      result.set(i, i, get(i));
    }

    return result;
  }
Beispiel #3
0
  @Override
  public Matrix toRowMatrix() {
    Matrix result = Basic2DMatrix.zero(1, length);

    for (int j = 0; j < length; j++) {
      result.set(0, j, get(j));
    }

    return result;
  }