public static void draw() { // Vector<Point> p = new Vector<Point>(); // Point p1 = new Point(1,0); // p1.setLocation(2, 7); // p.addElement(p1); // p1.setLocation(5, 7); // p.addElement(p1); // p1.setLocation(1, 3); // p.addElement(p1); // p1.setLocation(2, 4); // p.addElement(p1); // p1.setLocation(5, 1); // p.addElement(p1); // Vector<double[]> points = new Vector<double[]>(); double[] p1 = {0.25, 0.82}; double[] p2 = {0.73, 0.16}; double[] p3 = {0.12, 0.21}; double[] p4 = {0.92, 0.80}; double[] p5 = {0.16, 0.46}; points.addElement(p1); points.addElement(p2); points.addElement(p3); points.addElement(p4); points.addElement(p5); Mat mp = DataConverter.jvector2Mat(points); // System.out.println(mp.dump()); // new Visu(points); }
public static void V2M() { Vector<double[]> v = new Vector<double[]>(); double[] temp = {1.0, 2.0, 3.0, 4.0}; v.add(temp); v.add(temp); v.add(temp); Mat m = DataConverter.jvector2Mat(v); System.out.println(m.dump()); }