3 Commitit 7cd99a59aa ... 5bd06b7af0

Tekijä SHA1 Viesti Päivämäärä
  haoqianpan 5bd06b7af0 Merge branch 'dev' of http://xzxunda.com:4000/longwangshan11/meanshift 4 vuotta sitten
  haoqianpan 4088bf1723 整理代码 4 vuotta sitten
  haoqianpan 7fd9209c62 整理代码 4 vuotta sitten
32 muutettua tiedostoa jossa 501 lisäystä ja 615 poistoa
  1. 16 0
      .idea/compiler.xml
  2. 20 0
      .idea/jarRepositories.xml
  3. 13 0
      .idea/libraries/Maven__com_oracle_ojdbc_ojdbc8_19_3_0_0.xml
  4. 13 0
      .idea/libraries/Maven__com_oracle_ojdbc_ons_19_3_0_0.xml
  5. 13 0
      .idea/libraries/Maven__com_oracle_ojdbc_oraclepki_19_3_0_0.xml
  6. 13 0
      .idea/libraries/Maven__com_oracle_ojdbc_osdt_cert_19_3_0_0.xml
  7. 13 0
      .idea/libraries/Maven__com_oracle_ojdbc_osdt_core_19_3_0_0.xml
  8. 13 0
      .idea/libraries/Maven__com_oracle_ojdbc_simplefan_19_3_0_0.xml
  9. 13 0
      .idea/libraries/Maven__com_oracle_ojdbc_ucp_19_3_0_0.xml
  10. 13 0
      .idea/libraries/Maven__org_apache_commons_commons_math3_3_6_1.xml
  11. 13 0
      .idea/misc.xml
  12. 124 0
      .idea/uiDesigner.xml
  13. 0 46
      src/main/java/index/adjust/Adjust.java
  14. 0 17
      src/main/java/index/adjust/PointXYCorRevise.java
  15. 0 1
      src/main/java/index/alg/BoxCorTrans.java
  16. 2 27
      src/main/java/index/alg/BoxFlow.java
  17. 0 13
      src/main/java/index/alg/BuildBoxFromList.java
  18. 0 2
      src/main/java/index/alg/BuildInitialWholeIndex.java
  19. 0 1
      src/main/java/index/alg/BuildLines.java
  20. 2 151
      src/main/java/index/alg/Cal.java
  21. 0 2
      src/main/java/index/alg/CurveTool.java
  22. 5 176
      src/main/java/index/alg/GetPoints.java
  23. 0 16
      src/main/java/index/alg/IndexTool.java
  24. 0 19
      src/main/java/index/alg/OccupyTransfer.java
  25. 0 66
      src/main/java/index/alg/Split.java
  26. 0 3
      src/main/java/index/alg/WorkPointsExclude.java
  27. 95 0
      src/main/java/index/alg/analyse/CalHpTimeDistance.java
  28. 0 19
      src/main/java/index/alg/boxscan/GetAllEdge.java
  29. 27 53
      src/main/java/index/alg/boxscan/ScanOutLine.java
  30. 1 3
      src/main/java/index/db/DbOperate.java
  31. 21 0
      src/main/java/index/log/Log.java
  32. 71 0
      src/main/java/index/plot/Plot.java

+ 16 - 0
.idea/compiler.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="meanshift" />
+      </profile>
+    </annotationProcessing>
+    <bytecodeTargetLevel>
+      <module name="meanshift" target="7" />
+    </bytecodeTargetLevel>
+  </component>
+</project>

+ 20 - 0
.idea/jarRepositories.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Central Repository" />
+      <option name="url" value="https://repo.maven.apache.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="central" />
+      <option name="name" value="Maven Central repository" />
+      <option name="url" value="https://repo1.maven.org/maven2" />
+    </remote-repository>
+    <remote-repository>
+      <option name="id" value="jboss.community" />
+      <option name="name" value="JBoss Community repository" />
+      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+    </remote-repository>
+  </component>
+</project>

+ 13 - 0
.idea/libraries/Maven__com_oracle_ojdbc_ojdbc8_19_3_0_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.oracle.ojdbc:ojdbc8:19.3.0.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ojdbc8/19.3.0.0/ojdbc8-19.3.0.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ojdbc8/19.3.0.0/ojdbc8-19.3.0.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ojdbc8/19.3.0.0/ojdbc8-19.3.0.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_oracle_ojdbc_ons_19_3_0_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.oracle.ojdbc:ons:19.3.0.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ons/19.3.0.0/ons-19.3.0.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ons/19.3.0.0/ons-19.3.0.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ons/19.3.0.0/ons-19.3.0.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_oracle_ojdbc_oraclepki_19_3_0_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.oracle.ojdbc:oraclepki:19.3.0.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/oraclepki/19.3.0.0/oraclepki-19.3.0.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/oraclepki/19.3.0.0/oraclepki-19.3.0.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/oraclepki/19.3.0.0/oraclepki-19.3.0.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_oracle_ojdbc_osdt_cert_19_3_0_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.oracle.ojdbc:osdt_cert:19.3.0.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/osdt_cert/19.3.0.0/osdt_cert-19.3.0.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/osdt_cert/19.3.0.0/osdt_cert-19.3.0.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/osdt_cert/19.3.0.0/osdt_cert-19.3.0.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_oracle_ojdbc_osdt_core_19_3_0_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.oracle.ojdbc:osdt_core:19.3.0.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/osdt_core/19.3.0.0/osdt_core-19.3.0.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/osdt_core/19.3.0.0/osdt_core-19.3.0.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/osdt_core/19.3.0.0/osdt_core-19.3.0.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_oracle_ojdbc_simplefan_19_3_0_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.oracle.ojdbc:simplefan:19.3.0.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/simplefan/19.3.0.0/simplefan-19.3.0.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/simplefan/19.3.0.0/simplefan-19.3.0.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/simplefan/19.3.0.0/simplefan-19.3.0.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_oracle_ojdbc_ucp_19_3_0_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.oracle.ojdbc:ucp:19.3.0.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ucp/19.3.0.0/ucp-19.3.0.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ucp/19.3.0.0/ucp-19.3.0.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/oracle/ojdbc/ucp/19.3.0.0/ucp-19.3.0.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_apache_commons_commons_math3_3_6_1.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.apache.commons:commons-math3:3.6.1">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/misc.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 0 - 46
src/main/java/index/adjust/Adjust.java

@@ -12,29 +12,14 @@ import java.util.Map;
 
 public class Adjust {
 
-//    public ArrayList<Point> fillSmall(ArrayList<Point> pointArrayList){
-//
-//        for (int i = 0 ; i < pointArrayList.size();i++){
-//
-//            Point point = pointArrayList.get()
-//
-//        }
-//
-//    }
-
     public ArrayList<Point> adjustShape(ArrayList<Point> initialShapeList,ArrayList<Point> changedShapeList,Integer adjustSize){
 
-//        Integer size = initialShapeList.size() - 1;
         Integer size = initialShapeList.size();
-//
-        System.out.println(size + "size");
 
         ArrayList<Point> afterAdjustPointsList = new ArrayList<>();
 
         Integer round = size / adjustSize;
 
-        System.out.println(round + "round");
-
         for (int i = 0; i < round ;i++){
 
             Integer indexBegin = i * adjustSize;
@@ -44,7 +29,6 @@ public class Adjust {
             //
             ArrayList<Point> pointArrayList = new ArrayList<>();//存放差值,借用arraylist<point>
 
-
             for (int j = indexBegin;j < indexEnd; j++){
                 Point iniPoint = initialShapeList.get(j);
                 Point chaPoint = changedShapeList.get(j);
@@ -53,43 +37,21 @@ public class Adjust {
                 pointDis.setColX(chaPoint.getColX());
                 pointArrayList.add(pointDis);
                 avgDec = avgDec + chaPoint.getColY() - iniPoint.getColY();
-                System.out.println("差值" + (chaPoint.getColY() - iniPoint.getColY()));
             }
 
-
-//            double[] param = fit.gaussFit(pointArrayList);
-            //求高斯分布值
-//            Gaussian gaussian = new Gaussian(param[0],param[1],param[2]);
-//            ArrayList<Double> dPoint = new ArrayList<>();
-//            for (int ii = 0 ; ii < pointArrayList.size();ii++){
-//
-//                Point point = pointArrayList.get(ii);
-//                Double x = point.getColX();
-//                Double y = gaussian.value(x);
-//                dPoint.add(y);
-//
-//            }
-
-
-
             avgDec = avgDec / adjustSize;
-//            System.out.println(avgDec + " avgdec");
 
             for (int j = indexBegin ; j < indexEnd;j++){
 
-//                Point chaPoint = changedShapeList.get(j);
                 Point intPoint = initialShapeList.get(j);
                 Point adjustPoint = new Point();
                 adjustPoint.setColX(intPoint.getColX());
                 adjustPoint.setColY(intPoint.getColY() + avgDec);
-//                adjustPoint.setColY(intPoint.getColY() + gaussian.value(intPoint.getColX()));
-//                System.out.println(new Date());
 
                 afterAdjustPointsList.add(adjustPoint);
             }
             //后面扩充不整除的情况
         }
-//        afterAdjustPointsList.add(afterAdjustPointsList.get(0));
         return afterAdjustPointsList;
     }
 
@@ -116,8 +78,6 @@ public class Adjust {
             Double diff = diffValueList.get(i);
             if (!isCloseToZero(diff)){
 
-                System.out.println("diff: " + diff + " iszero? " + isCloseToZero(diff));
-
                 Map nonZeroInfoMap = new HashMap();
 
                 nonZeroInfoMap.put("INDEX",i);
@@ -137,9 +97,6 @@ public class Adjust {
                 Integer index1 = (int)map1.get("INDEX");
                 Integer index2 = (int)map2.get("INDEX");
 
-                System.out.println("index1:" + index1);
-                System.out.println("index2:" + index2);
-
                 Double beginDiff = diffValueList.get(index1);
                 Double endDiff = diffValueList.get(index2);
 
@@ -155,13 +112,10 @@ public class Adjust {
 
                 }
 
-
             }
 
         }
 
-        /////
-
         for (int i = 0 ; i < initialShapeList.size();i++){
 
             Point point = new Point();

+ 0 - 17
src/main/java/index/adjust/PointXYCorRevise.java

@@ -16,7 +16,6 @@ public class PointXYCorRevise {
             point1.setColX(point.getColY());
             point1.setColY(point.getColX());
             arrayListAfterRevise.add(point1);
-//            pointArrayListForRevise.set(i,point);
 
         }
 
@@ -24,20 +23,4 @@ public class PointXYCorRevise {
 
     }
 
-//    public ArrayList<Point> reviseBack(ArrayList<Point> pointArrayListForRevise){
-//
-//        for (int i = 0 ; i < pointArrayListForRevise.size();i++){
-//
-//            Point point = pointArrayListForRevise.get(i);
-//            Double temp = point.getColX();
-//            point.setColX(point.getColY());
-//            point.setColY(temp);
-//            pointArrayListForRevise.set(i,point);
-//
-//        }
-//
-//        return pointArrayListForRevise;
-
-//    }
-
 }

+ 0 - 1
src/main/java/index/alg/BoxCorTrans.java

@@ -25,7 +25,6 @@ public class BoxCorTrans {
         Double yAt = yFt * wholeIndex.getyGap() + wholeIndex.getMinY();
 
         Point pointAfterTrans = new Point();
-
         pointAfterTrans.setColX(xAt);
         pointAfterTrans.setColY(yAt);
 

+ 2 - 27
src/main/java/index/alg/BoxFlow.java

@@ -4,7 +4,6 @@ import index.alg.boxscan.ScanOutLine;
 import index.entity.*;
 import index.log.Log;
 import index.plot.Plot;
-
 import java.util.ArrayList;
 
 public class BoxFlow {
@@ -67,55 +66,31 @@ public class BoxFlow {
         scanOutLine.scan(boxArrayList,100);
         ArrayList<ArrayList<BoxEdge>> shapeList = scanOutLine.getShapeList();
         ArrayList<ArrayList<Point>> shapePointList = scanOutLine.getShapePointList();
-
-
         Log.print("扫描结束");
-
-
         BoxCorTrans boxCorTrans = new BoxCorTrans(wholeIndex);
-
-
         //中点
         ArrayList<ArrayList<Point>> pointsArrayList = new ArrayList<>();
-
         //取边的中点相连
         for (int i = 0 ; i < shapeList.size();i++){
-
             ArrayList<Point> points = new ArrayList<>();
             ArrayList<BoxEdge> boxEdges = shapeList.get(i);
             for (int j = 0 ; j < boxEdges.size();j++){
-
                 BoxEdge boxEdge = boxEdges.get(j);
                 Point pointMiddle = boxEdge.getMiddlePoint();
                 points.add(pointMiddle);
-
             }
 
             points = boxCorTrans.pointArrayListTrans(points);
             points.add(points.get(0));
-            plot.collectData("shapemiddle-" + i,points);
+            plot.collectData("shapealg-" + i,points);
             pointsArrayList.add(points);
-
         }
-
-//        for (int i = 0 ; i < pointsArrayList.size();i++){
-//
-//            ArrayList<Point> points = shapePointList.get(i);
-//            points.add(points.get(0));
-//            points = boxCorTrans.pointArrayListTrans(points);
-//            System.out.println(points.size());
-//            plot.collectData("shape-" + i,points);
-//
-//        }
-
         //网格端点直连
         for (int i = 0 ; i < shapePointList.size();i++){
-
             ArrayList<Point> points = shapePointList.get(i);
             points.add(points.get(0));
             points = boxCorTrans.pointArrayListTrans(points);
-            System.out.println(points.size());
-            plot.collectData("shape-" + i,points);
+//            plot.collectData("shape-" + i,points);
         }
 
         plot.normalPrint();

+ 0 - 13
src/main/java/index/alg/BuildBoxFromList.java

@@ -16,13 +16,6 @@ public class BuildBoxFromList {
     //
     public ArrayList<Box> build(WholeIndex wholeIndex,ArrayList<ArrayList<Integer>> indexsList){
 
-        Double minX = wholeIndex.getMinX();
-        Double minY = wholeIndex.getMinY();
-        Integer numOfGapsX = wholeIndex.getNumOfGapsX();
-        Integer numOfGapsY = wholeIndex.getNumOfGapsY();
-        Double xGap =wholeIndex.getxGap();
-        Double yGap = wholeIndex.getyGap();
-
         ArrayList<Box> boxArrayList = new ArrayList<>();
         for (int i = 0 ; i < indexsList.size();i++){
 
@@ -38,11 +31,6 @@ public class BuildBoxFromList {
                     Point rightDownPoint = new Point();
                     Point leftDownPoint = new Point();
 
-//                    Double minXOfBox = i * xGap;
-//                    Double maxXOfBox = minXOfBox + xGap;
-//                    Double minYOfBox = j * yGap;
-//                    Double maxYOfBox = minYOfBox + yGap;
-
                     double minXOfBox = i;
                     double maxXOfBox = i + 1 ;
                     double minYOfBox = j;
@@ -83,7 +71,6 @@ public class BuildBoxFromList {
 
         return boxArrayList;
 
-
     }
 
 }

+ 0 - 2
src/main/java/index/alg/BuildInitialWholeIndex.java

@@ -8,8 +8,6 @@ import java.io.FileNotFoundException;
 import java.util.ArrayList;
 
 public class BuildInitialWholeIndex {
-
-
     //
     public WholeIndex build(ArrayList<Point> pointsList,Integer numOfGapsX,Integer numOfGapsY){
 

+ 0 - 1
src/main/java/index/alg/BuildLines.java

@@ -13,7 +13,6 @@ public class BuildLines {
 
         ArrayList<LineSegment> lineSegments = new ArrayList<>();
         CurveTool tool = new CurveTool();
-
         for (int i = 0 ; i < (pointsList.size() - 1);i++){
 
             //两个点形成直线

+ 2 - 151
src/main/java/index/alg/Cal.java

@@ -6,17 +6,9 @@ import index.alg.analyse.CalHpTimeDistance;
 import index.entity.OccupyPerX;
 import index.entity.Point;
 import index.entity.WholeIndexOccupy;
-import index.file.OperateFile;
 import index.fit.Fit;
-import index.plot.Plot;
-import org.apache.commons.math3.analysis.function.Gaussian;
-
-import java.io.FileNotFoundException;
-import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
 
 public class Cal {
     ArrayList<OccupyPerX> occupyPerXArrayList = new ArrayList<>();//占用情况
@@ -27,9 +19,7 @@ public class Cal {
         GetPoints getPoints = new GetPoints();
         getPoints.getPoints(workDirection);
         ArrayList<Point> realShapePoints = getPoints.realShapePoints;//实际形状的平面坐标
-//        GetPoints getPoints = new GetPoints();//所有待计算点
         ArrayList<Point> allPoints = getPoints.allPoints;//所有待计算点,铲车作业平面坐标
-
         ///
         ArrayList<ArrayList<Date>> dateForAna = getPoints.dateForAna;
         CalHpTimeDistance calHpTimeDistance = new CalHpTimeDistance(dateForAna);
@@ -41,9 +31,6 @@ public class Cal {
         ArrayList<Double> xIndexCorList = split.xIndexCorList;//格点横坐标List
         ArrayList<Double> yIndexCorList = split.yIndexCorList;//格点纵坐标List
         WholeIndexOccupy wholeIndexOccupy = split.wholeIndexOccupy;//初始垛位的占用情况
-//        ArrayList<Point> occupyShapeList = wholeIndexOccupy.getOccupyPointsArrayList();//坐标形式的初始形状
-        System.out.println(occupyPerXArrayList);
-//        wholeIndexOccupy.printOccupy();
         Double xGap = split.xGap;//横向上采用的间隔
         Double yGap = split.yGap;//纵向上采用的间隔
         Double minX = xIndexCorList.get(0);
@@ -53,11 +40,6 @@ public class Cal {
         wholeIndexOccupy.printOccupy(minX,minY,xGap,yGap);
         ArrayList<Point> occupyShapeList = wholeIndexOccupy.getOccupyPointsArrayList();//坐标形式的初始形状
         ArrayList<Point> pointAfterExclude = new ArrayList<>();//过滤后的所有点的坐标
-        OperateFile operateFile = new OperateFile();
-        //所有的作业轨迹点,只是点,不用连成直线
-//        operateFile.printPoint("Y:\\allpoints.txt",allPoints);
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/allpoints.txt",allPoints);
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/initialcor.txt",occupyShapeList);
         //对待计算点,进行过滤,过滤掉在网格以外的,这部分后面单独写个过滤类
         for(int i = 0 ; i < allPoints.size();i++){
             Point point = allPoints.get(i);
@@ -74,25 +56,11 @@ public class Cal {
         boxFlow.start(realShapePoints,pointAfterExclude);
         //
 
-        //对所有的轨迹点经过排除后剩下来的点
-//        operateFile.printPoint("Y:\\pointsexclude.txt",pointAfterExclude);
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/pointsexclude.txt",pointAfterExclude);
-
 
 
         //占用的网格为1,不占用的网格0
         ArrayList<ArrayList<Integer>> occupyList = changeWholeIndexOccupyToList(wholeIndexOccupy);
-//        for (int i = 0; i < occupyList.size();i++){
-//
-//            System.out.println("ceshi");
-//            System.out.println(occupyList.get(i));
-//
-//
-//        }
-//        System.out.println(occupyList);
-
 
-//        System.out.println("print all points---------------" );
 
         for (int i = 0; i < pointAfterExclude.size();i++){
 
@@ -101,7 +69,6 @@ public class Cal {
             Double y = point.getColY();
 
 
-//            System.out.println( x + " " + y);
 
             Integer xIndex = split.identifyXIndex(x);
             Integer yIndex = split.identifyYIndex(y);
@@ -113,7 +80,6 @@ public class Cal {
                 occupyList.set(xIndex,arrayList);
             }
         }
-//        System.out.println("print all points end -----------");
 
         for (int i = 0 ; i < occupyList.size();i++){
             ArrayList<Integer> arrayList = occupyList.get(i);
@@ -122,7 +88,6 @@ public class Cal {
             StringBuffer sb1 = new StringBuffer();
             for (int jj = 0 ; jj < arrayList.size();jj++){
                 if (arrayList.get(jj).toString().equals("0")){
-//                    System.out.println("该列有空格");
                     sb.append(" ");
                     sb1.append("+");
                 }
@@ -133,7 +98,6 @@ public class Cal {
             }
             String arrayListString = sb.toString();
             String arrayListString1 = sb1.toString();
-            System.out.println("print string----------" + arrayListString1);
             String[] arrays = arrayListString.split("\\s+");
             String maxString ="";
             //这里需要再想想
@@ -160,19 +124,7 @@ public class Cal {
             point.setColX(xCor);
             point.setColY(yCor);
             shape.add(point);
-//            OccupyPerX occupyPerX = occupyPerXArrayList.get(i);
-//            Double xCor1 = minX + i * xGap;
-//            Double xCor2 = minX + i * xGap + xGap;
-//            Integer yIndex = occupyPerX.maxYIndex;
-//            Double yCor = minY + yIndex * yGap + 0.5 * yGap;
-//            Point point1 = new Point();
-//            point1.setColX(xCor1);
-//            point1.setColY(yCor);
-//            Point point2 = new Point();
-//            point2.setColX(xCor2);
-//            point2.setColY(yCor);
-//            shape.add(point1);
-//            shape.add(point2);
+
         }
 
         for (int i = (occupyPerXArrayList.size() -1) ; i >=0;i--){
@@ -184,19 +136,7 @@ public class Cal {
             point.setColX(xCor);
             point.setColY(yCor);
             shape.add(point);
-//            OccupyPerX occupyPerX = occupyPerXArrayList.get(i);
-//            Double xCor1 = minX + i * xGap;
-//            Double xCor2 = minX + i * xGap + xGap;
-//            Integer yIndex = occupyPerX.minYIndex;
-//            Double yCor = minY + yIndex * yGap + 0.5 * yGap;
-//            Point point1 = new Point();
-//            point1.setColX(xCor1);
-//            point1.setColY(yCor);
-//            Point point2 = new Point();
-//            point2.setColX(xCor2);
-//            point2.setColY(yCor);
-//            shape.add(point2);
-//            shape.add(point1);
+
         }
 
         //对算法结果做一些调整
@@ -207,26 +147,8 @@ public class Cal {
 
         //填充空值
         Adjust adjust = new Adjust();
-//        ArrayList<Point> shapeFill = fit.allCircleFitDefault(afterAdjustPointsList);
-//        shape = fit.excludePoints(shape);
         shape.add(shape.get(0));
         ArrayList<Point> afterAdjustPointsList = adjust.fillArrayListPlus(occupyShapeList,shape,10);
-//        System.out.println(shape.size());
-//        for (int i = 0 ; i < shape.size() ; i++){
-//            System.out.println(shape.get(i).getColX() + " " + shape.get(i).getColY() );
-//            System.out.println(shape.get(i).getColY());
-//        }
-
-        //计算后垛位形状,已经网格化处理
-//        operateFile.printPoint("Y:\\changed.txt",shape);
-//        Special special = new Special();
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/changed.txt",shape);
-//        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/changedFill.txt",shapeFill);
-        //拟合
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/changedFill.txt",shapeFill);
-        //对计算结果进行修正,
-//        operateFile.printPoint("Y:\\adjustchanged.txt",afterAdjustPointsList);
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/adjustchanged.txt",afterAdjustPointsList);
 
         ///打印,临时用的,主要是为了调整坐标
         PointXYCorRevise pointXYCorRevise = new PointXYCorRevise();
@@ -234,7 +156,6 @@ public class Cal {
         for (int i = 0 ; i <realShapePoints.size();i++){
 
             Point point  = realShapePoints.get(i);
-            System.out.println(point.getColX() + " " + point.getColY());
 
         }
 
@@ -245,44 +166,11 @@ public class Cal {
         for (int i = 0 ; i < realShapePoints.size();i++){
 
             Point point  = realShapePoints.get(i);
-            System.out.println(point.getColX() + " " + point.getColY());
 
         }
 
-
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/revise/initial.txt",realShapePoints);
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/revise/adjustchanged.txt",afterAdjustPointsList);
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/revise/pointsexclude.txt",pointAfterExclude);
-
-
-//        Plot plot = new Plot();
-//        Map mapInitialShape = new HashMap();
-//        Map mapAdjustChanged = new HashMap();
-//        Map mapPointExclude = new HashMap();
-//
-//        mapInitialShape.put("FILE_NAME","initial.txt");
-//        mapInitialShape.put("POINTS_LIST",realShapePoints);
-//
-//        mapAdjustChanged.put("FILE_NAME","adjustchanged.txt");
-//        mapAdjustChanged.put("POINTS_LIST",afterAdjustPointsList);
-//
-//        mapPointExclude.put("FILE_NAME","pointsexclude.txt");
-//        mapPointExclude.put("POINTS_LIST",pointAfterExclude);
-//
-//        ArrayList<Map> mapArrayList = new ArrayList<>();
-//        mapArrayList.add(mapInitialShape);
-//        mapArrayList.add(mapAdjustChanged);
-//        mapArrayList.add(mapPointExclude);
-//
-//        plot.revisePlot("/Users/haoqianpan/file/programfile/meanshift/out/revise/",mapArrayList);
-
-
-
         return shape;
 
-
-
-
     }
 
 
@@ -291,7 +179,6 @@ public class Cal {
 
         ArrayList<OccupyPerX> occupyPerXArrayList = wholeIndexOccupy.getOccupyPerXArrayList();
 
-        System.out.println(occupyPerXArrayList);
 
         Integer numOfGaps = occupyPerXArrayList.size();
 
@@ -319,7 +206,6 @@ public class Cal {
 
             ArrayList<Integer> arrayList = occupyList.get(i);
 
-//            if ()
 
             for (int j = minYIndex ; j < (maxYIndex + 1); j++){
 
@@ -338,24 +224,18 @@ public class Cal {
 
     public ArrayList<Point> adjustShape(ArrayList<Point> initialShapeList,ArrayList<Point> changedShapeList,Integer adjustSize){
 
-//        Integer size = initialShapeList.size() - 1;
         Integer size = initialShapeList.size();
 //
-        System.out.println(size + "size");
-
         ArrayList<Point> afterAdjustPointsList = new ArrayList<>();
 
         Integer round = size / adjustSize;
 
-        System.out.println(round + "round");
-
         for (int i = 0; i < round ;i++){
 
             Integer indexBegin = i * adjustSize;
             Integer indexEnd = indexBegin + adjustSize;
 
             Double avgDec = 0.0;
-            //
             ArrayList<Point> pointArrayList = new ArrayList<>();//存放差值,借用arraylist<point>
 
             for (int j = indexBegin;j < indexEnd; j++){
@@ -366,53 +246,24 @@ public class Cal {
                 pointDis.setColX(chaPoint.getColX());
                 pointArrayList.add(pointDis);
                 avgDec = avgDec + chaPoint.getColY() - iniPoint.getColY();
-                System.out.println("差值" + (chaPoint.getColY() - iniPoint.getColY()));
             }
 
-
-//            double[] param = fit.gaussFit(pointArrayList);
-            //求高斯分布值
-//            Gaussian gaussian = new Gaussian(param[0],param[1],param[2]);
-//            ArrayList<Double> dPoint = new ArrayList<>();
-//            for (int ii = 0 ; ii < pointArrayList.size();ii++){
-//
-//                Point point = pointArrayList.get(ii);
-//                Double x = point.getColX();
-//                Double y = gaussian.value(x);
-//                dPoint.add(y);
-//
-//            }
-
-
-
             avgDec = avgDec / adjustSize;
-//            System.out.println(avgDec + " avgdec");
 
             for (int j = indexBegin ; j < indexEnd;j++){
 
-//                Point chaPoint = changedShapeList.get(j);
                 Point intPoint = initialShapeList.get(j);
                 Point adjustPoint = new Point();
                 adjustPoint.setColX(intPoint.getColX());
                 adjustPoint.setColY(intPoint.getColY() + avgDec);
-//                adjustPoint.setColY(intPoint.getColY() + gaussian.value(intPoint.getColX()));
-//                System.out.println(new Date());
 
                 afterAdjustPointsList.add(adjustPoint);
             }
             //后面扩充不整除的情况
         }
 
-
-//        afterAdjustPointsList.add(afterAdjustPointsList.get(0));
-
-
-
         return afterAdjustPointsList;
 
-
     }
 
-
-
 }

+ 0 - 2
src/main/java/index/alg/CurveTool.java

@@ -58,8 +58,6 @@ public class CurveTool {
         Double lineA = lineParamList.get(0);
         Double lineC = lineParamList.get(2);
 
-//        System.out.println();
-
         Double y = lineA * x + lineC;
         return y;
 

+ 5 - 176
src/main/java/index/alg/GetPoints.java

@@ -7,6 +7,8 @@ import index.db.ConnectToSourceDB;
 import index.db.DbOperate;
 import index.entity.Point;
 import index.file.OperateFile;
+import index.log.Log;
+
 import java.io.FileNotFoundException;
 import java.sql.Connection;
 import java.sql.ResultSet;
@@ -28,7 +30,6 @@ public class GetPoints {
 
     ArrayList<Point> realShapePoints = new ArrayList<>();
     ArrayList<Point> allPoints = new ArrayList<>();
-//    ArrayList<Map> anaMapList = new ArrayList<>();
     ArrayList<ArrayList<Date>> dateForAna = new ArrayList<>();
 
     public ArrayList<Point> returnPoints(){
@@ -41,151 +42,15 @@ public class GetPoints {
 
     public void getPoints(Integer workDirection) throws SQLException, FileNotFoundException {
 
-        //B50
-//        String realShapeBeginTime = "2020-07-09 15:06:00.000000";
-//        String realShapeEndTime = "2020-07-09 15:08:00.000000";
-//
-//        String allPointsBeginTime = "2020-07-12 06:36:00.000000";
-//        String allPointsEndTime = "2020-07-12 06:41:00.000000";
-
-////        B39
-//        String realShapeBeginTime = "2020-07-13 14:09:00.000000";
-//        String realShapeEndTime = "2020-07-13 14:12:00.000000";
-//
-//        String allPointsBeginTime = "2020-07-15 11:25:00.000000";
-//        String allPointsEndTime = "2020-07-15 11:27:00.000000";
-
-        //B3
-//        String realShapeBeginTime = "2020-07-13 14:15:00.000000";
-//        String realShapeEndTime = "2020-07-13 14:20:00.000000";
-//
-//        String allPointsBeginTime = "2020-07-15 11:33:00.000000";
-//        String allPointsEndTime = "2020-07-15 11:36:00.000000";
-
-//        A03
-//        String realShapeBeginTime = "2020-07-13 14:27:00.000000";
-//        String realShapeEndTime = "2020-07-13 14:30:00.000000";
-//
-//        String allPointsBeginTime = "2020-07-15 11:46:00.000000";
-//        String allPointsEndTime = "2020-07-15 11:49:00.000000";
-
-        //A17
-//        String realShapeBeginTime = "2020-07-13 14:37:00.000000";
-//        String realShapeEndTime = "2020-07-13 14:40:00.000000";
-//
-//        String allPointsBeginTime = "2020-07-15 11:41:00.000000";
-//        String allPointsEndTime = "2020-07-15 11:44:00.000000";
-
-//        A08
-//        String realShapeBeginTime = "2020-07-22 14:58:00.000000";
-//        String realShapeEndTime = "2020-07-22 15:04:00.000000";
-//
-//        String allPointsBeginTime = "2020-07-24 20:17:00.000000";
-//        String allPointsEndTime = "2020-07-25 07:36:00.000000";
-
-        //
-//        String whereUserName = " and login_user_id = '17332803555'";
-
-//        String sql1 = "select GPS_LAT,GPS_LON from T_LOC_APP_CLIENT_STATUS@DBLINKLOC WHERE CLIENT_RECORD_TIME between to_timestamp('" + realShapeBeginTime  + "', 'yyyy-mm-dd hh24:mi:ss.ff') and to_timestamp('" + realShapeEndTime + "', 'yyyy-mm-dd hh24:mi:ss.ff') and (GPS_SOURCE_TYPE = '千寻(4)' OR '千寻(5)')";
-//        String sql2 = "select GPS_LAT,GPS_LON from T_LOC_APP_CLIENT_STATUS@DBLINKLOC WHERE CLIENT_RECORD_TIME between to_timestamp('" + allPointsBeginTime  + "', 'yyyy-mm-dd hh24:mi:ss.ff') and to_timestamp('" + allPointsEndTime + "', 'yyyy-mm-dd hh24:mi:ss.ff') and (GPS_SOURCE_TYPE = '千寻(4)' OR '千寻(5)')";
-
-//        sql1 = sql1 + whereUserName;
-//        sql2 = sql2 + whereUserName;
-
-        //b32
-        //跑圈开始时间
-//        String realShapeBeginTime = "2020-08-27 10:10:30.000000";
-//        String realShapeEndTime = "2020-08-27 10:13:15.000000";
-//        String realShapeBeginTime = "2020-08-29 12:11:00.000000";
-//        String realShapeEndTime = "2020-08-29 12:14:00.000000";
-
-        //b15
-//        跑圈开始结束时间
-//        String realShapeBeginTime = "2020-09-01 10:54:00.000000";
-//        String realShapeEndTime = "2020-09-01 10:56:00.000000";
-
-        //a30
-////        String realShapeBeginTime = "2020-09-02 14:27:30.000000";
-////        String realShapeEndTime = "2020-09-02 14:30:00.000000";
-
-//        a30
-//        String realShapeBeginTime = "2020-09-02 18:06:42.000000";
-//        String realShapeEndTime = "2020-09-02 18:08:18.000000";
-
-        //b53-437跑垛位
         String realShapeBeginTime = "2020-09-08 15:17:14.000000";
         String realShapeEndTime = "2020-09-08 15:19:37.000000";
 
-
-//        String queryShapeSql = sqlFactory(realShapeBeginTime,realShapeEndTime,"港装K438");
-//        String queryShapeSql = sqlFactory(realShapeBeginTime,realShapeEndTime,"港装K121");
-//        String queryShapeSql = sqlFactory(realShapeBeginTime,realShapeEndTime,"港装K437");
-//        realShapePoints = buildPoints(queryShapeSql,workDirection);
-//        realShapePoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/gpsexc/in/a30.txt",workDirection);
         realShapePoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/a49shape.txt",workDirection);
-
         //
-        ArrayList<String> userNameArrayList = new ArrayList<>();
         ArrayList<String> machineIdList = new ArrayList<>();
         ArrayList<String> allPointsBeginTimeList = new ArrayList<>();
         ArrayList<String> allPointsEndTimeList = new ArrayList<>();
-//        userNameArrayList.add("testApp1");
-
-        //438第一次上下垛时间
-//        machineIdList.add("港装K438");
-//        allPointsBeginTimeList.add("2020-08-27 11:05:00.000000");
-//        allPointsEndTimeList.add("2020-08-27 19:33:00.000000");
-
-////        438第二次上下垛时间
-//        machineIdList.add("港装K438");
-//        allPointsBeginTimeList.add("2020-08-27 20:25:00.000000");
-//        allPointsEndTimeList.add("2020-08-28 07:15:00.000000");
-
-////        438第三次上下垛时间
-//        machineIdList.add("港装K438");
-//        allPointsBeginTimeList.add("2020-08-28 08:35:00.000000");
-//        allPointsEndTimeList.add("2020-08-28 21:24:00.000000");
-
-////        438第四次上下垛时间
-//        machineIdList.add("港装K438");
-//        allPointsBeginTimeList.add("2020-08-29 08:29:00.000000");
-//        allPointsEndTimeList.add("2020-08-29 20:29:00.000000");
-
-//        121第一次上下垛时间
-//        machineIdList.add("港装K121");
-//        allPointsBeginTimeList.add("2020-09-01 10:06:00.000000");
-//        allPointsEndTimeList.add("2020-09-01 10:50:00.000000");
-
-        //a30第一次上下垛时间
-//        machineIdList.add("港装K121");
-//        allPointsBeginTimeList.add("2020-09-01 12:11:00.000000");
-//        allPointsEndTimeList.add("2020-09-02 11:00:00.000000");
-//
-//        machineIdList.add("港装K438");
-//        allPointsBeginTimeList.add("2020-09-02 14:30:00.000000");
-//        allPointsEndTimeList.add("2020-09-02 18:06:00.000000");
-
-        //b53-437上下垛位
-//        machineIdList.add("港装K437");
-//        allPointsBeginTimeList.add("2020-09-08 15:19:37.000000");
-//        allPointsEndTimeList.add("2020-09-08 22:00:00.000000");
-        //b53-121上下垛位
-//        machineIdList.add("港装K121");
-//        allPointsBeginTimeList.add("2020-09-08 15:19:37.000000");
-//        allPointsEndTimeList.add("2020-09-08 22:00:00.000000");
-
-//        machineIdList.add("港装K736");
-//        allPointsBeginTimeList.add("2020-09-11 11:27:42.000000");
-//        allPointsEndTimeList.add("2020-09-11 23:23:00.000000");
-
-//        machineIdList.add("港装K736");
-//        allPointsBeginTimeList.add("2020-09-13 08:11:00.000000");
-//        allPointsEndTimeList.add("2020-09-13 13:20:00.000000");
-//
-//        machineIdList.add("港装K736");
-//        allPointsBeginTimeList.add("2020-09-13 23:35:00.000000");
-//        allPointsEndTimeList.add("2020-09-14 10:42:00.000000");
-
+        //a49
         machineIdList.add("港装K736");
         allPointsBeginTimeList.add("2020-09-11 12:11:00.000000");
         allPointsEndTimeList.add("2020-09-18 10:20:00.000000");
@@ -194,35 +59,18 @@ public class GetPoints {
         allPointsBeginTimeList.add("2020-09-17 13:35:00.000000");
         allPointsEndTimeList.add("2020-09-18 08:12:00.000000");
 
+        Log.print("开始查询作业点");
         for (int i  = 0 ; i < (machineIdList.size());i++){
 
             String machineId = machineIdList.get(i);
             String beginTime = allPointsBeginTimeList.get(i);
             String endTime = allPointsEndTimeList.get(i);
             String allPointsQuerySql = sqlFactory(beginTime,endTime,machineId);
-//            String allPointsQuerySql = sqlFactoryTemp(beginTime,endTime,machineId);
             ArrayList<Point> pointsTemp = buildPoints(allPointsQuerySql,workDirection);
             allPoints.addAll(pointsTemp);
 
         }
-
-
-
-
-//        realShapePoints = buildPoints(sql1);
-//        allPoints = buildPoints(sql2);
-//        realShapePoints = buildPointsFromFile("Y:\\programresult\\dbdiff\\points\\shape.txt");
-
-//        allPoints = buildPointsFromFile("Y:\\programresult\\dbdiff\\points\\allpoints.txt");
-//        realShapePoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/initial_data.txt");
-//        allPoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/working_data_x_0.33333.txt");
-//        allPoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/working_data_x_0.0333.txt");
-//        allPoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/working_data_x_0.66666.txt");
-//        allPoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/working_data_y_0.33333.txt");
-//        allPoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/working_data_y_0.66666.txt");
-//        allPoints = buildPointsFromFile("/Users/haoqianpan/file/programfile/meanshift/in/working_data_y_0.99999.txt");
-//        Connection
-
+        Log.print("作业点查询结束");
 
     }
 
@@ -243,8 +91,6 @@ public class GetPoints {
             Double lat = resultSet.getDouble(1);
             Double lon = resultSet.getDouble(2);
             Date date = resultSet.getDate(3);
-//            Map mapTemp = new HashMap();
-//            mapTemp.put("date",date);
             dateArrayList.add(date);
             Point point = gpsExchange.gpsToPoints(lat,lon);
             pointArrayList.add(point);
@@ -259,31 +105,14 @@ public class GetPoints {
 
             pointArrayList = pointXYCorRevise.revise(pointArrayList);
 
-
         }
 
         return pointArrayList;
     }
-//    public ArrayList<Point> buildPointsFromFile(String filePath) throws FileNotFoundException {
-//        ArrayList<Point> pointArrayList = new ArrayList<>();
-//        OperateFile operateFile = new OperateFile();
-//        ArrayList<Map> pointsMapList = operateFile.readPoints(filePath);
-//        for (int i = 0 ; i < pointsMapList.size();i++){
-//            Map mapTemp = pointsMapList.get(i);
-//            Double lat = (Double) mapTemp.get("lat");
-//            Double lon = (Double) mapTemp.get("lon");
-//            GpsExchange gpsExchange = new GpsExchange();
-//            Point point = gpsExchange.gpsToPoints(lat,lon);
-//            pointArrayList.add(point);
-//        }
-//        return pointArrayList;
-//    }
 
     public ArrayList<Point> buildPointsFromFile(String filePath,Integer workDirection) throws FileNotFoundException {
         OperateFile operateFile = new OperateFile();
-
         ArrayList<Point> pointArrayList  = operateFile.readPointsFromFile(filePath);
-
         GpsExchange gpsExchange = new GpsExchange();
         for (int i = 0 ; i < pointArrayList.size();i++){
 

+ 0 - 16
src/main/java/index/alg/IndexTool.java

@@ -31,7 +31,6 @@ public class IndexTool {
         Double pointX = point.getColX();
         Double pointY = point.getColY();
 
-
         Double xIndexTemp = (pointX - minX) / xGap;
         Double yIndexTemp = (pointY - minY) / yGap;
 
@@ -39,18 +38,6 @@ public class IndexTool {
         Integer yIndex = yIndexTemp.intValue();
         Index index = new Index();
 
-//        if (xIndex == numOfGapsX){
-//
-//            xIndex = xIndex -1;
-//
-//        }
-//
-//        if (yIndex == numOfGapsY){
-//
-//            yIndex = yIndex -1;
-//
-//        }
-
         if (xIndex >= numOfGapsX){
 
             xIndex = numOfGapsX -1;
@@ -74,7 +61,6 @@ public class IndexTool {
 
     public  Integer identifyYIndex(Double yCor){
 
-
         Double yIndexTemp = (yCor - minY)/yGap;
         Integer yIndex = yIndexTemp.intValue();
 
@@ -92,8 +78,6 @@ public class IndexTool {
 
     public  Integer identifyXIndex(Double xCor){
 
-
-//        Double xMin = xIndexCorList.get(0);
         Double xIndexTemp = (xCor - minX)/xGap;
         Integer xIndex = xIndexTemp.intValue();
 

+ 0 - 19
src/main/java/index/alg/OccupyTransfer.java

@@ -8,24 +8,12 @@ public  class OccupyTransfer {
 
     public static OccupyIndex pointToIndex(WholeIndex wholeIndex, OccupyPoint occupyPoint){
 
-//         获取网格划分的一些参数
-        Double minX = wholeIndex.getMinX();
-        Double minY = wholeIndex.getMinY();
-        Integer numOfGapsX = wholeIndex.getNumOfGapsX();
-        Integer numOfGapsY = wholeIndex.getNumOfGapsY();
-        Double xGap =wholeIndex.getxGap();
-        Double yGap = wholeIndex.getyGap();
-
         IndexTool indexTool = new IndexTool(wholeIndex);
-
         //
         ArrayList<ArrayList<BeginEndPoint>> occupyPoints = occupyPoint.getOccupyPoints();
-
         //
         ArrayList<ArrayList<BeginEndIndex>> occupyIndexs = new ArrayList<>();
 
-
-
         for (int i = 0 ; i < occupyPoints.size();i++){
 
             //一列
@@ -49,7 +37,6 @@ public  class OccupyTransfer {
 
             occupyIndexs.add(thisOccupyIndex);
 
-
         }
 
         OccupyIndex occupyIndex = new OccupyIndex();
@@ -58,10 +45,4 @@ public  class OccupyTransfer {
 
     }
 
-    public static void indexToPoint(){
-
-
-
-    }
-
 }

+ 0 - 66
src/main/java/index/alg/Split.java

@@ -4,7 +4,6 @@ import index.entity.Index;
 import index.entity.OccupyPerX;
 import index.entity.Point;
 import index.entity.WholeIndexOccupy;
-import index.file.OperateFile;
 
 import java.io.FileNotFoundException;
 import java.util.ArrayList;
@@ -28,14 +27,8 @@ public class Split {
     //输入垛位的初始实际形状,形成网格
     public void cal(ArrayList<Point> pointsList) throws FileNotFoundException {
 
-        OperateFile operateFile = new OperateFile();
-
-
-        operateFile.printPoint("/Users/haoqianpan/file/programfile/meanshift/out/initial.txt",pointsList);
         pointsList.add(pointsList.get(0));
 
-
-
         Point point0 = pointsList.get(0);
 
         double minX = point0.getColX();
@@ -86,11 +79,6 @@ public class Split {
         Point pointC = new Point();
         Point pointD = new Point();
 
-        System.out.println("maxX " + maxX);
-        System.out.println("minX " + minX);
-        System.out.println("maxY " + maxY);
-        System.out.println("minY " + minY);
-
         pointA.setColX(minX);
         pointA.setColY(minY);
 
@@ -180,10 +168,6 @@ public class Split {
 
         return linesParamList;
 
-
-
-
-
     }
 
     //计算直线在各个网格内的占据情况
@@ -191,15 +175,11 @@ public class Split {
 
         Double xMin = xIndexCorList.get(0);
         Double yMin = yIndexCorList.get(0);
-        ///
         //该直线起始点的网格位置
         Index indexI = identifyIndex(pointI);
         Index indexJ = identifyIndex(pointJ);
-
-        //
         Integer xIndexBegin = indexI.getxIndex();//网格横向起始编号
         Integer yIndexBegin = indexI.getyIndex();//网格纵向起始编号
-
         Integer xIndexEnd = indexJ.getxIndex();//网格横向终止编号
         Integer yIndexEnd = indexJ.getyIndex();//网格纵向终止编号
 
@@ -221,34 +201,9 @@ public class Split {
 
         }
 
-//        if (isTest){
-//
-//            System.out.println("ISTEST起始横向网格" + xIndexBegin);
-//            System.out.println("ISTEST终止横向网格" + xIndexEnd);
-//            System.out.println("ISTEST起始纵向网格" + lineYIndexMin);
-//            System.out.println("ISTEST终止纵向网格" + lineYIndexMax);
-//            System.out.println("直线参数为:" + lineParamList);
-//
-//            ///测试直线
-//            Double xTest = pointI.getColX();
-//            Double yTest = pointI.getColY();
-//            Double yTestResult = tool.getLineYValue(xTest,lineParamList);
-//            System.out.println("xtest:" + xTest);
-//            System.out.println("ytest:" + yTest);
-//            System.out.println("ytestresult:" + yTestResult);
-//
-//        }
-
-
-
         //对该格点跨越的所有横向网格序号作循环
         for (int i = xIndexBegin;i < xIndexEnd + 1; i++){
 
-            if (i == 100){
-                System.out.println(xIndexBegin);
-                System.out.println(xIndexEnd);
-                System.out.println(pointJ.getColX());
-            }
             //计算该直线(线段)在当前横向的网格内,在纵向的占据情况
             Integer minYIndex;
             Integer maxYIndex;
@@ -257,11 +212,6 @@ public class Split {
             Double yOutBegin;//
             Double yOutEnd;//
 
-
-
-
-
-
             xInputBegin = xMin + xGap * i;//当前网格的起始横坐标
             xInputEnd = xInputBegin + xGap;//当前网格的终止横坐标
 
@@ -317,7 +267,6 @@ public class Split {
 
             }
 
-
             wholeIndexOccupy.setOccupyPerXArrayList(occupyPerX,i);
         }
     }
@@ -325,7 +274,6 @@ public class Split {
     //输入x,得到y值
 
 
-
     public Index identifyIndex(Point point){
 
         Double pointX = point.getColX();
@@ -372,19 +320,15 @@ public class Split {
 
     public  Integer identifyYIndex(Double yCor){
 
-
         Double yMin = yIndexCorList.get(0);
         Double yIndexTemp = (yCor - yMin)/yGap;
         Integer yIndex = yIndexTemp.intValue();
         return yIndex;
 
-
     }
 
     public  Integer identifyXIndex(Double xCor){
 
-
-//        Double xMin = xIndexCorList.get(0);
         Double xMin = xIndexCorList.get(0);
         Double xIndexTemp = (xCor - xMin)/xGap;
         Integer xIndex = xIndexTemp.intValue();
@@ -397,17 +341,7 @@ public class Split {
 
         return xIndex;
 
-
     }
 
 
-
-
-
-
-
-
-
-
-
 }

+ 0 - 3
src/main/java/index/alg/WorkPointsExclude.java

@@ -10,18 +10,15 @@ public class WorkPointsExclude {
     public ArrayList<Point> pointsExclude(ArrayList<Point> allWorkPoints, WholeIndex wholeIndex){
 
         ArrayList<Point> pointAfterExclude = new ArrayList<>();
-
         Double minX = wholeIndex.getMinX();
         Double minY = wholeIndex.getMinY();
         Integer numOfGapsX = wholeIndex.getNumOfGapsX();
         Integer numOfGapsY = wholeIndex.getNumOfGapsY();
         Double xGap =wholeIndex.getxGap();
         Double yGap = wholeIndex.getyGap();
-
         Double maxX = minX + numOfGapsX * xGap;
         Double maxY = minY + numOfGapsY * yGap;
 
-
         for(int i = 0 ; i < allWorkPoints.size();i++){
             Point point = allWorkPoints.get(i);
             Double corX = point.getColX();

+ 95 - 0
src/main/java/index/alg/analyse/CalHpTimeDistance.java

@@ -0,0 +1,95 @@
+package index.alg.analyse;
+
+import index.entity.Point;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Date;
+
+public class CalHpTimeDistance {
+
+    ArrayList<Long> diffList = new ArrayList<>();
+    Double avg =0.;
+    ArrayList<Integer> distList = new ArrayList<>();
+
+    public CalHpTimeDistance(ArrayList<ArrayList<Date>> dateForAna){
+
+            for (int i = 0 ; i< dateForAna.size();i++){
+                ArrayList<Date> dateArrayList = dateForAna.get(i);
+                for (int j = 0 ; j < dateArrayList.size() - 1;j++){
+
+                    int k = j + 1;
+                    Date dateJ = dateArrayList.get(j);
+                    Date dateK = dateArrayList.get(k);
+                    long diff = dateK.getTime() - dateJ.getTime();
+                    diffList.add(diff);
+                }
+            }
+
+    }
+
+    public double getAvDiff(){
+
+        for (int i = 0;i < diffList.size();i++){
+            avg = avg + diffList.get(i);
+        }
+        avg = avg / diffList.size();
+
+        return avg;
+
+    }
+
+    public void buildDistribution(int binNum) throws FileNotFoundException {
+
+        for (int i = 0 ; i < binNum;i++){
+            distList.add(0);
+        }
+
+        long maxDiff = 0;
+        long minDiff = 0;
+
+        for (int i = 0;i< diffList.size();i++){
+
+            long diff = diffList.get(i);
+
+            if (diff >= maxDiff && diff < 5000){
+
+                maxDiff = diff;
+
+            }
+            if (diff <= minDiff){
+
+                minDiff = diff;
+            }
+        }
+
+        double binDis = (maxDiff - minDiff) / binNum;
+
+        for (int i = 0 ; i < diffList.size();i++){
+
+            long diff = diffList.get(i);
+            Integer index = (int)((diff - minDiff) / binDis);
+            if (index >= binNum){
+                index = binNum - 1;
+            }
+            Integer oldValue = distList.get(index);
+            distList.set(index,oldValue + 1);
+        }
+
+        ArrayList<Point> pointArrayList = new ArrayList<>();
+        for (int i = 0 ; i < distList.size();i++){
+
+            Double x = i * binDis + minDiff + 0.5 * binDis;
+            Double y = distList.get(i).doubleValue();
+            Point point = new Point();
+            point.setColX(x);
+            point.setColY(y);
+            pointArrayList.add(point);
+        }
+
+    }
+
+
+
+
+
+}

+ 0 - 19
src/main/java/index/alg/boxscan/GetAllEdge.java

@@ -3,12 +3,9 @@ package index.alg.boxscan;
 import index.entity.Box;
 import index.entity.BoxEdge;
 import index.entity.Point;
-import index.log.Log;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
-import java.util.LinkedHashSet;
 
 //输入网格,输出边(去重处理过后的)
 public class GetAllEdge {
@@ -66,22 +63,7 @@ public class GetAllEdge {
             uidList.add(edgeUid);
             }
 
-        //
-//        for (int i = 0 ; i < uidList.size();i++){
-//
-//            String uidTemp = uidList.get(i);
-//            Log.print(uidTemp);
 
-//        }
-//        Log.print(" " + uidList.indexOf("97.0-71.0-98.0-71.0"));
-//        Log.print(" " + uidList.lastIndexOf("97.0-71.0-98.0-71.0"));
-
-//        Log.print(" " + uidList.get(35052));
-//        Log.print(" " + uidList.get(35058));
-//
-//        Log.print(" " + uidList.size());
-
-//        ArrayList<String> uidListCopy = uidList;
         ArrayList<String> uidListCopy = new ArrayList<>();
         //copy
         for (int i = 0 ; i < uidList.size();i++){
@@ -110,7 +92,6 @@ public class GetAllEdge {
 
             else {
 
-//                System.out.println(uidList.get(i) + " " + frequency);
 
             }
 

+ 27 - 53
src/main/java/index/alg/boxscan/ScanOutLine.java

@@ -1,12 +1,10 @@
 package index.alg.boxscan;
 
-import com.sun.org.apache.bcel.internal.generic.NEW;
 import index.entity.Box;
 import index.entity.BoxEdge;
 import index.entity.Point;
 import index.log.Log;
 
-import java.awt.*;
 import java.util.ArrayList;
 
 
@@ -63,29 +61,20 @@ public class ScanOutLine {
         Log.print("形成的边总数为:" + boxEdgeArrayList.size());
 
         //随机挑选一个边,然后从边中挑选一个点
-
         //闭合轮廓list
 
-
         //挑边
         Integer randomBoxEdgeIndex = (int) (Math.random() * boxEdgeArrayList.size());
         Log.print("随机挑选第 " + randomBoxEdgeIndex + "条边");
         BoxEdge initialBoxEdge = boxEdgeArrayList.get(randomBoxEdgeIndex);
 
-
-        Log.print("测试isEdgeEqual方法开始");
-
-        judgeEdgeEqual1(initialBoxEdge,initialBoxEdge);
-
-        Log.print("测试isEdgeEqual方法结束");
+        judgeEdgeEqual(initialBoxEdge,initialBoxEdge);
 
         //挑点,这里挑点1或者点2都可以
         Point pointInitial = initialBoxEdge.getPoint1();
 
         int scanCounter = 0;
 
-
-
         //某一个连通轮廓
         ArrayList<BoxEdge> shapeSingle = new ArrayList<>();
 
@@ -101,12 +90,6 @@ public class ScanOutLine {
 
             Log.print("第" + scanCounter + "次扫描");
 
-            //某一个连通轮廓
-//            ArrayList<BoxEdge> shapeSingle = new ArrayList<>();
-//
-            //走过的点的list
-//            ArrayList<Point> shapePoint = new ArrayList<>();
-
             ArrayList<BoxEdge> matchBoxEdgeArrayList =new ArrayList<>();
 
             Point pointNext = new Point();
@@ -123,6 +106,7 @@ public class ScanOutLine {
                 if (!isPointLegal(pointNextTemp, this.numOfGaps)) {
 
                     Log.print("沿 " + direction + " 方向没有可移动点");
+
                     continue;
 
                 }
@@ -230,7 +214,6 @@ public class ScanOutLine {
 
         if ((point1.getColX().equals(point2.getColX())) && (point1.getColY().equals(point2.getColY()))){
 
-
             isEqual = true;
 
         }
@@ -297,17 +280,11 @@ public class ScanOutLine {
     }
 
     public boolean judgeEdgeEqual(BoxEdge boxEdge1,BoxEdge boxEdge2){
-
-//        Log.print("检查边是否相等");
         boolean isEdgeEqual = false;
         Point boxEdge1Point1 = boxEdge1.getPoint1();
-//        Log.printPoint(boxEdge1Point1);
         Point boxEdge1Point2 = boxEdge1.getPoint2();
-//        Log.printPoint(boxEdge1Point2);
         Point boxEdge2Point1 = boxEdge2.getPoint1();
-//        Log.printPoint(boxEdge2Point1);
         Point boxEdge2Point2 = boxEdge2.getPoint2();
-//        Log.printPoint(boxEdge2Point2);
 
 
         if (((judgePointEqual(boxEdge1Point1,boxEdge2Point1))&&(judgePointEqual(boxEdge1Point2,boxEdge2Point2))) ||((judgePointEqual(boxEdge1Point1,boxEdge2Point2))&&(judgePointEqual(boxEdge1Point2,boxEdge2Point1)))){
@@ -316,37 +293,36 @@ public class ScanOutLine {
 
         }
 
-//        Log.print("检查结束,isEdgeEqual: " + isEdgeEqual);
 
         return isEdgeEqual;
 
     }
 
-    public boolean judgeEdgeEqual1(BoxEdge boxEdge1,BoxEdge boxEdge2){
-
-        Log.print("检查边是否相等");
-        boolean isEdgeEqual = false;
-        Point boxEdge1Point1 = boxEdge1.getPoint1();
-        Log.printPoint(boxEdge1Point1);
-        Point boxEdge1Point2 = boxEdge1.getPoint2();
-        Log.printPoint(boxEdge1Point2);
-        Point boxEdge2Point1 = boxEdge2.getPoint1();
-        Log.printPoint(boxEdge2Point1);
-        Point boxEdge2Point2 = boxEdge2.getPoint2();
-        Log.printPoint(boxEdge2Point2);
-
-
-        if (((judgePointEqual(boxEdge1Point1,boxEdge2Point1))&&(judgePointEqual(boxEdge1Point2,boxEdge2Point2))) ||((judgePointEqual(boxEdge1Point1,boxEdge2Point2))&&(judgePointEqual(boxEdge1Point2,boxEdge2Point1)))){
-
-            isEdgeEqual = true;
-
-        }
-
-        Log.print("检查结束,isEdgeEqual: " + isEdgeEqual);
-
-        return isEdgeEqual;
-
-    }
+//    public boolean judgeEdgeEqual1(BoxEdge boxEdge1,BoxEdge boxEdge2){
+//
+//        Log.print("检查边是否相等");
+//        boolean isEdgeEqual = false;
+//        Point boxEdge1Point1 = boxEdge1.getPoint1();
+//        Log.printPoint(boxEdge1Point1);
+//        Point boxEdge1Point2 = boxEdge1.getPoint2();
+//        Log.printPoint(boxEdge1Point2);
+//        Point boxEdge2Point1 = boxEdge2.getPoint1();
+//        Log.printPoint(boxEdge2Point1);
+//        Point boxEdge2Point2 = boxEdge2.getPoint2();
+//        Log.printPoint(boxEdge2Point2);
+//
+//
+//        if (((judgePointEqual(boxEdge1Point1,boxEdge2Point1))&&(judgePointEqual(boxEdge1Point2,boxEdge2Point2))) ||((judgePointEqual(boxEdge1Point1,boxEdge2Point2))&&(judgePointEqual(boxEdge1Point2,boxEdge2Point1)))){
+//
+//            isEdgeEqual = true;
+//
+//        }
+//
+//        Log.print("检查结束,isEdgeEqual: " + isEdgeEqual);
+//
+//        return isEdgeEqual;
+//
+//    }
 
     public ArrayList<BoxEdge> findEqualBoxEdgeFromList(BoxEdge boxEdge,ArrayList<BoxEdge> boxEdgeArrayList){
         ArrayList<BoxEdge> equalBoxEdgeArrayList = new ArrayList<>();
@@ -359,6 +335,4 @@ public class ScanOutLine {
         return equalBoxEdgeArrayList;
     }
 
-
-
 }

+ 1 - 3
src/main/java/index/db/DbOperate.java

@@ -7,9 +7,7 @@ import java.sql.Statement;
 
 public class DbOperate {
 
-//    public Connection getConnection(){
-//
-//    }
+
 
     public ResultSet runQuerySql(Connection connection, String sql) throws SQLException {
         Statement statement = connection.createStatement();

+ 21 - 0
src/main/java/index/log/Log.java

@@ -0,0 +1,21 @@
+package index.log;
+
+import index.entity.Point;
+
+import java.util.Date;
+
+public class Log {
+
+    public static void print(String log){
+
+        System.out.println(new Date() + "--------" +log);
+
+    }
+
+    public static void printPoint(Point point){
+
+        print(point.getColX() + " " + point.getColY());
+
+    }
+
+}

+ 71 - 0
src/main/java/index/plot/Plot.java

@@ -0,0 +1,71 @@
+package index.plot;
+
+import index.adjust.PointXYCorRevise;
+import index.db.DbOperate;
+import index.entity.Point;
+import index.file.OperateFile;
+
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Plot {
+
+    String basicFilePath;
+
+    public Plot(String basicFilePath){
+
+        this.basicFilePath = basicFilePath;
+
+    }
+
+    ArrayList<Map> mapFileArrayList = new ArrayList<>();
+
+    public void collectData(String fileName,ArrayList<Point> pointArrayList){
+
+        Map map = new HashMap();
+        map.put("FILE_NAME",fileName);
+        map.put("POINTS_LIST",pointArrayList);
+        mapFileArrayList.add(map);
+
+    }
+
+    public void normalPrint() throws FileNotFoundException {
+
+        OperateFile operateFile = new OperateFile();
+
+        for (int i = 0 ; i < mapFileArrayList.size();i++){
+
+            Map map = mapFileArrayList.get(i);
+            String fileName = map.get("FILE_NAME").toString();
+            ArrayList<Point> pointArrayList = (ArrayList<Point>)map.get("POINTS_LIST");
+            operateFile.printPoint(basicFilePath + fileName,pointArrayList);
+        }
+
+    }
+
+
+    //特殊用途
+    public void revisePlot(ArrayList<Map> mapFileArrayList) throws FileNotFoundException {
+
+        OperateFile operateFile = new OperateFile();
+        PointXYCorRevise pointXYCorRevise = new PointXYCorRevise();
+
+        for (int i = 0 ; i < mapFileArrayList.size();i++){
+
+            Map map = mapFileArrayList.get(i);
+            String fileName = map.get("FILE_NAME").toString();
+            ArrayList<Point> pointArrayList = (ArrayList<Point>)map.get("POINTS_LIST");
+            pointArrayList = pointXYCorRevise.revise(pointArrayList);
+            operateFile.printPoint(basicFilePath + fileName,pointArrayList);
+        }
+
+    }
+
+
+
+
+
+
+}