Vector Manipulation Layer (VectorLib)


getCol
to get specified columns of array



FUNCTIONS

int[] - getCol(int[] data, int startcol, int endcol)
double[] - getCol(double[] data, int startcol, int endcol)
int[] - getCol(int[][] data, int col)
double[] - getCol(double[][] data, int col)
int[][] - getCol(int[][] data, int startcol, int endcol)
double[][] - getCol(double[][] data, int startcol, int endcol)




EXAMPLES

Example VectorLib vlib=new VectorLib();
int[] a={4, 8, 6};
int[] b=vlib.getCol(a, 1, 2);
vlib.view("Data", b);
Output Data =
8      6


Example VectorLib vlib=new VectorLib();
double[] a={4.4, 8.2, 6.5};
double[] b=vlib.getCol(a, 0, 1);
vlib.view("Data", b);
Output Data =
4.4      8.2


Example VectorLib vlib=new VectorLib();
int[][] a={{4, 8, 6}, {7, 2, 5}, {1, 3, 9}};
int[] b=vlib.getCol(a, 2);
vlib.view("Data", b);
Output Data =
6      5      9


Example VectorLib vlib=new VectorLib();
double[][] a={{4.4, 8.2, 6.5}, {7.1, 2.4, 5.3}, {1.8, 3.6, 9.2}};
double[] b=vlib.getCol(a, 1);
vlib.view("Data", b);
Output Data =
8.2      2.4      3.6


Example VectorLib vlib=new VectorLib();
int[][] a={{4, 8, 6}, {7, 2, 5}, {1, 3, 9}};
int[][] b=vlib.getCol(a, 1, 2);
vlib.view("Data", b);
Output Data =
8      6
2      5
3      9


Example VectorLib vlib=new VectorLib();
double[][] a={{4.4, 8.2, 6.5}, {7.1, 2.4, 5.3}, {1.8, 3.6, 9.2}};
double[][] b=vlib.getCol(a, 0, 1);
vlib.view("Data", b);
Output Data =
4.4      8.2
7.1      2.4
1.8      3.6