Exemplo n.º 1
0
    public static RInt expandYVector(IntImpl yarg, int ysize, int count) {
        int size = ysize;
        int nsize = size * count;
        int[] y = yarg.getContent();

        int[] res = new int[nsize];
        int offset = 0;
        for (int elem = 0; elem < size; elem++) {
            int v = y[elem];
            Arrays.fill(res, offset, offset + count, v);
            offset += count;
        }
        return RInt.RIntFactory.getFor(res);
    }
Exemplo n.º 2
0
    public static RDouble expandYVector(DoubleImpl yarg, int ysize, int count) {
        int size = ysize;
        int nsize = size * count;
        double[] y = yarg.getContent();

        double[] res = new double[nsize];
        int offset = 0;
        for (int elem = 0; elem < size; elem++) {
            double v = y[elem];
            Arrays.fill(res, offset, offset + count, v);
            offset += count;
        }
        return RDouble.RDoubleFactory.getFor(res);
    }
Exemplo n.º 3
0
 static {
   Arrays.fill(connections, null);
 }