Example |
VectorLib vlib=new VectorLib(); int[] data={20, 30, 50, 45, 35, 70, 80, 55}; vlib.setDraw(data); |
Output |
![]() |
Example |
VectorLib vlib=new VectorLib(); int[] data={20, 30, 50, 45, 35, 70, 80, 55}; vlib.setDraw(data, true); |
Output |
![]() |
Example |
VectorLib vlib=new VectorLib(); int[][] data={{20, 20}, {20, 30}, {30, 30}, {70, 70}, {80, 80}}; vlib.setDraw(data); |
Output |
![]() |
Example |
VectorLib vlib=new VectorLib(); double[][] data={{20.3, 20.7}, {20.5, 30.9}, {30.2, 30.6}, {70.3, 70.6}, {80.8, 80.2}}; vlib.setDraw(data); |
Output |
![]() |
Example |
VectorLib vlib=new VectorLib(); int[][] data={{20, 20}, {30, 20}, {30, 30}, {70, 70}, {80, 80}}; int[] clusters={0, 0, 0, 1, 1}; vlib.setDraw(data, clusters); |
Output |
![]() |
Example |
VectorLib vlib=new VectorLib(); int[][] data={{20, 20}, {30, 20}, {30, 30}, {70, 70}, {80, 80}}; int[][] centroids={{25, 25}, {75, 75}}; Object[] object={data, centroids}; vlib.setDraw(object); |
Output |
![]() |
Example |
VectorLib vlib=new VectorLib(); int[][] data={{20, 20}, {30, 20}, {30, 30}, {70, 70}, {80, 80}}; int[][] centroids={{25, 25}, {75, 75}}; Object[] object={data, centroids}; //You have to import java.awt.Color and import java.awt.Paint Paint[] colors={Color.black, Color.green}; vlib.setDraw(object, colors); |
Output |
![]() |
Example |
VectorLib vlib=new VectorLib(); double[][] data=null; vlib.view(data.length); Plot2D plot=null; for (int i=0; i<5; i++) { data=vlib.initArrayRandom(5, 2, 0.0, 100.0); plot=vlib.setDraw(plot,data); vlib.delay(); } |
Output | View moving data in the plot |