public int searchEqualMatch(PatternResult targetMatch, List<PatternResult> matches) {
    double targetStartX = targetMatch.getPoints().get(0).getX();
    double targetEndX = targetMatch.getPoints().get(targetMatch.getPoints().size() - 1).getX();
    for (int idx = 0; idx < matches.size(); idx++) {
      if (Math.abs(targetStartX - matches.get(idx).getPoints().get(0).getX()) <= 10
          && Math.abs(
                  targetEndX
                      - matches
                          .get(idx)
                          .getPoints()
                          .get(matches.get(idx).getPoints().size() - 1)
                          .getX())
              <= 10) {
        return idx;
      }
    }
    return -1;
  }
Given a list of tangents it divides the list of tangents in a list of sections. Each section
shares the same tangent signs (a section could be an increasing curve or a decreasing curve,
but not both)

@return Array of sections.
library-udf/src/main/java/org/apache/iotdb/library/match/PatternExecutor.java