This is an automated email from the ASF dual-hosted git repository.

leirui pushed a commit to branch research/area-visualization
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit a3702eef02af92948dd0981140d5ebe31a5ed047
Author: Lei Rui <[email protected]>
AuthorDate: Fri Dec 20 01:10:24 2024 +0800

    add
---
 .../iotdb/db/query/simpiece/Visval_standard.java   | 50 +++++++++++-----------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/query/simpiece/Visval_standard.java 
b/server/src/main/java/org/apache/iotdb/db/query/simpiece/Visval_standard.java
index 095a8e234f7..b5033b86097 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/query/simpiece/Visval_standard.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/query/simpiece/Visval_standard.java
@@ -148,7 +148,7 @@ public class Visval_standard {
     List<Polyline> polylineList = new ArrayList<>();
     Random rand = new Random();
     int n = 1000_000;
-    int p = 1000;
+    int p = 10;
     for (int i = 0; i < n; i += p) {
       Polyline polylineBatch = new Polyline();
       for (int j = i; j < Math.min(i + p, n); j++) {
@@ -159,30 +159,6 @@ public class Visval_standard {
       polylineList.add(polylineBatch);
     }
 
-//    float[] vlist = new float[]{11346, 33839, 35469, 23108, 22812, 5519, 
5526, 4865, 5842, 23089};
-//    for (int i = 0; i < vlist.length; i++) {
-//      polyline.addVertex(new vPoint(i, vlist[i]));
-//    }
-
-//    ArrayList<Double> v = new ArrayList<>();
-//    String filePath = "D://desktop//数据集//New York Stock 
Exchange//merged_prices.csv";
-//    try (BufferedReader br = new BufferedReader(new FileReader(filePath))) {
-//      String line;
-//      int count = 0;
-//      while ((line = br.readLine()) != null && count < 1000) {
-//        String[] columns = line.split(","); // 假设 CSV 文件以逗号分隔
-//        v.add(Double.parseDouble(columns[0])); // 读取第一列数据
-//        count++;
-//      }
-//    } catch (Exception e) {
-//      e.printStackTrace();
-//    }
-//    // 打印数据长度
-//    System.out.println("Data length: " + v.size());
-//    for (int i = 0; i < v.size(); i++) {
-//      polyline.addVertex(new vPoint(i, v.get(i)));
-//    }
-
     System.out.println("---------------------------------");
     List<vPoint> results = new ArrayList<>();
     // 计算运行时间
@@ -227,5 +203,29 @@ public class Visval_standard {
     System.out.println("sameCnt=" + sameCnt + ", percent=" + sameCnt * 1.0 / 
mergedList.size());
 
   }
+
+//    float[] vlist = new float[]{11346, 33839, 35469, 23108, 22812, 5519, 
5526, 4865, 5842, 23089};
+//    for (int i = 0; i < vlist.length; i++) {
+//      polyline.addVertex(new vPoint(i, vlist[i]));
+//    }
+
+//    ArrayList<Double> v = new ArrayList<>();
+//    String filePath = "D://desktop//数据集//New York Stock 
Exchange//merged_prices.csv";
+//    try (BufferedReader br = new BufferedReader(new FileReader(filePath))) {
+//      String line;
+//      int count = 0;
+//      while ((line = br.readLine()) != null && count < 1000) {
+//        String[] columns = line.split(","); // 假设 CSV 文件以逗号分隔
+//        v.add(Double.parseDouble(columns[0])); // 读取第一列数据
+//        count++;
+//      }
+//    } catch (Exception e) {
+//      e.printStackTrace();
+//    }
+//    // 打印数据长度
+//    System.out.println("Data length: " + v.size());
+//    for (int i = 0; i < v.size(); i++) {
+//      polyline.addVertex(new vPoint(i, v.get(i)));
+//    }
 }
 

Reply via email to