Return a vector of values corresponding to a given vector of times.
@param times A given vector of times.
@return A vector of values corresponding to the given vector of times.
554000
public RandomVariable[] getValues(double[] times) {
		RandomVariable[] values = new RandomVariable[times.length];

		for(int i=0; i<times.length; i++) {
			values[i] = getValue(null, times[i]);
		}

		return values;
	}
87790
private static String join(String str, int times, String sep) {
    	StringBuilder sb = new StringBuilder();
    	for(int i = 0; i < times; i++) {
    		sb.append(str);
    		if(i < times - 1) {
    			sb.append(sep);
    		}
    	}
    	return sb.toString();
    }
625279
public Matrix timesEquals(double s)
    {
        for (int i = 0; i < m; i++)
        {
            for (int j = 0; j < n; j++)
            {
                A[i][j] = s * A[i][j];
            }
        }
        return this;
    }
242451
public AbstractByteList times(int times) {
	AbstractByteList newList = new ByteArrayList(times*size());
	for (int i=times; --i >= 0; ) {
		newList.addAllOfFromTo(this,0,size()-1);
	}
	return newList;
}
766539
public static double[] plusTimesEquals(final double[] v1, final double[] v2, final double s2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    for(int i = 0; i < v1.length; i++) {
      v1[i] += s2 * v2[i];
    }
    return v1;
  }
201065
public Vector4i mul(int scalar, Vector4i dest) {
        dest.x = x * scalar;
        dest.y = y * scalar;
        dest.z = z * scalar;
        dest.w = w * scalar;
        return dest;
    }
627770
public static DoubleMatrix getInstance(int rows, double... values)
    {
        if (rows < 1)
        {
            throw new IllegalArgumentException("rows");
        }
        if (values.length % rows != 0)
        {
            throw new IllegalArgumentException("not full rows");
        }
        return new DoubleMatrix(rows, Arrays.copyOf(values, values.length));
    }
724206
function(value, times) {
        if (Array.fill) {
          return new Array(times).fill(value);
        }
        return Array.apply(null, Array(+times)).map(function() {
          return value;
        });
      }
424090
public static String replicate(String s, int times) {
        if (s==null) return null;
        if (times <= 0 || s.length() == 0) return "";

        StringBuilder b = new StringBuilder(s.length() * times);
        for (int k = 1; k <= times; ++k) b.append(s);
        return b.toString();
    }
371731
function( times ) {

		function compareTime( i, j ) {

			return times[ i ] - times[ j ];

		}

		var n = times.length;
		var result = new Array( n );
		for ( var i = 0; i !== n; ++ i ) result[ i ] = i;

		result.sort( compareTime );

		return result;

	}
1245332
public static double[] yVals(double[] vector) {
        double[] y = new double[vector.length / 2];
        int count = 0;
        for (int i = 0; i < vector.length; i++) {
            if (i % 2 == 0)
                y[count++] = vector[i];
        }
        return y;
    }
995199
public static String repeat(String source, int times) {
        dbc.precondition(source != null, "cannot repeat a null source");
        dbc.precondition(times > -1, "times must be non negative");
        final int srcLen = source.length();
        final long longLen = times * (long) srcLen;
        final int len = (int) longLen;
        dbc.precondition(longLen == len, "resulting String would be too long");
        final char[] array = new char[len];
        for (int i = 0; i != times; ++i) {
            source.getChars(0, srcLen, array, i * srcLen);
        }
        return new String(array);
    }
119805
public static double[] timesPlusTimes(final double[] v1, final double s1, final double[] v2, final double s2) {
    assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
    final double[] result = new double[v1.length];
    for(int i = 0; i < result.length; i++) {
      result[i] = v1[i] * s1 + v2[i] * s2;
    }
    return result;
  }
363191
public static String times(String s, int num) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < num; ++i) {
            builder.append(s);
        }
        return builder.toString();
    }
788217
function(vector) {
    var V = vector.elements || vector;
    var n = this.elements.length, k = n, i;
    if (n != V.length) { return null; }
    var dot = 0, mod1 = 0, mod2 = 0;
    // Work things out in parallel to save time
    this.each(function(x, i) {
      dot += x * V[i-1];
      mod1 += x * x;
      mod2 += V[i-1] * V[i-1];
    });
    mod1 = Math.sqrt(mod1); mod2 = Math.sqrt(mod2);
    if (mod1*mod2 === 0) { return null; }
    var theta = dot / (mod1*mod2);
    if (theta < -1) { theta = -1; }
    if (theta > 1) { theta = 1; }
    return Math.acos(theta);
  }
443766
def vectorize(values):
    
    if isinstance(values, list):
        return ','.join(str(v) for v in values)
    return values
1336381
public Vector getValues(int index, Matrix m) {
        if (m.rows != 3) return null;

        Vector result = basis.getValues(0, m).mul(C.matrix[0][index]);
        for (int i = 1; i < count_basis; i++)
            if (C.matrix[i][index] != 0d) result.add(basis.getValues(i, m).mul(C.matrix[0][index]));
        return result;
    }