Creates an {@link IntegerVector} of the kind specified by the user.
434175
private IntegerVector createSemanticVector() {
        IntegerVector v = (useSparseSemantics) 
            ? new CompactSparseIntegerVector(vectorLength)
            : new DenseIntVector(vectorLength);
        return v;
    }
1044234
public static <T> FactorComparator<T> create(final String factorName, final int weight,
      final Comparator<T> comparator) {

    if (null == factorName || factorName.length() == 0 || weight < 0 || null == comparator) {
      logger.error(
          "failed to create instance of FactorComparator, at least one of the input paramters are invalid");
      return null;
    }

    return new FactorComparator<>(factorName, weight, comparator);
  }
1274834
def CreateNumpyVector(self, x):
        """"""

        if np is None:
            # Numpy is required for this feature
            raise NumpyRequiredForThisFeature("Numpy was not found.")

        if not isinstance(x, np.ndarray):
            raise TypeError("non-numpy-ndarray passed to CreateNumpyVector")

        if x.dtype.kind not in ['b', 'i', 'u', 'f']:
            raise TypeError("numpy-ndarray holds elements of unsupported datatype")

        if x.ndim > 1:
            raise TypeError("multidimensional-ndarray passed to CreateNumpyVector")

        self.StartVector(x.itemsize, x.size, x.dtype.alignment)

        # Ensure little endian byte ordering
        if x.dtype.str[0] == "<":
            x_lend = x
        else:
            x_lend = x.byteswap(inplace=False)

        # Calculate total length
        l = UOffsetTFlags.py_type(x_lend.itemsize * x_lend.size)
        ## @cond FLATBUFFERS_INTERNAL
        self.head = UOffsetTFlags.py_type(self.Head() - l)
        ## @endcond

        # tobytes ensures c_contiguous ordering
        self.Bytes[self.Head():self.Head()+l] = x_lend.tobytes(order='C')
        
        return self.EndVector(x.size)
1179388
public static BasicVector fromMap(Map<Integer, ? extends Number> map, int length) {
        return Vector.fromMap(map, length).to(Vectors.BASIC);
    }
763222
@Override
	public BitVector range(int from, int to) {
		if (from < 0) throw new IllegalArgumentException();
		if (to < from) throw new IllegalArgumentException();
		from += start;
		to += start;
		if (to > finish) throw new IllegalArgumentException();
		return new BitVector(from, to, bits, mutable);
	}
1033867
public static SparseIntegerVector immutable(SparseIntegerVector vector) {
        if (vector == null)
            throw new NullPointerException("Cannot create an immutable " +
                                           "null vector");
         return new ViewIntegerAsIntegerSparseVector(vector, true);
    }
1325456
public static INDArray toVector(Vector arr) {
        return Nd4j.create(Nd4j.createBuffer(arr.toArray()));
    }
387945
static Integer[] createIntegers() {
        int len = INTEGER_UPPER_BOUND - INTEGER_LOWER_BOUND + 1;
        Integer[] ret = new Integer[len];
        int val = (int) INTEGER_LOWER_BOUND;
        for (int i = 0; i < len; i++, val++) {
            ret[i] = new Integer(val);
        }
        return ret;
    }
272997
public static <S> PAreaFGenerator<S> create()
  {
    final Generator<Double> base = PrimitiveGenerators.doubles(0.0, 10000.0);
    return new PAreaFGenerator<>(() -> Float.valueOf(base.next().floatValue()));
  }
260811
@Pure
	@Inline(value = "new Vector2ifx(Math.cos($1), Math.sin($1))", imported = {Vector2ifx.class})
	public static Vector2ifx toOrientationVector(double angle) {
		return new Vector2ifx(Math.cos(angle), Math.sin(angle));
	}
1172747
public void product(IntIntVector other) {
        // TODO: Add special case for IntIntDenseVector.
        for (int i=0; i<size; i++) {
            elements[i + start] *= other.get(i);
        }
    }
361209
private Assignment createAssignment(final LNGBooleanVector vec) {
    final Assignment model = new Assignment();
    for (int i = 0; i < vec.size(); i++) {
      final Literal lit = this.index2var.get(i);
      if (lit != null) {
        if (vec.get(i))
          model.addLiteral(lit);
        else
          model.addLiteral(lit.negate());
      }
    }
    return model;
  }
335471
static IntegerDateElement create(
        String name,
        int index,
        int dmin,
        int dmax,
        char symbol
    ) {

        return new IntegerDateElement(
            name,
            index,
            Integer.valueOf(dmin),
            Integer.valueOf(dmax),
            symbol
        );

    }
1002859
public AttributeVector response() {
        double[] y = new double[data.size()];
        for (int i = 0; i < y.length; i++) {
            y[i] = data.get(i).y;
        }
        return new AttributeVector(response, y);
    }
656734
public static Vector4 createVector(double x, double y, double z, double h) {
		Vector4 v=new Vector4Impl();
		v.setX(x);
		v.setY(y);
		v.setZ(z);
		v.setH(h);
		return v;
	}
825437
public VectorSize readVectorCoordinateSize() throws IOException {
        int size = getInt(), numEntries = getInt();

        return new VectorSize(size, numEntries);
    }
1128967
public static Vector toVector(INDArray arr) {
        if (!arr.isVector()) {
            throw new IllegalArgumentException("passed in array must be a vector");
        }
        // FIXME: int cast
        double[] ret = new double[(int) arr.length()];
        for (int i = 0; i < arr.length(); i++) {
            ret[i] = arr.getDouble(i);
        }

        return Vectors.dense(ret);
    }