From 65f013a5de3e53adb457a9aa9b68ff643ebfb1fc Mon Sep 17 00:00:00 2001 From: Tomasz Zok Date: Thu, 18 Jul 2024 17:50:35 +0200 Subject: [PATCH] ref: reformat code --- .../main/java/pl/poznan/put/mcq/cli/Lcs.java | 1 - .../java/pl/poznan/put/comparison/LCSv2.java | 30 ++++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Lcs.java b/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Lcs.java index f9b5c6b9..594c953d 100644 --- a/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Lcs.java +++ b/mcq-cli/src/main/java/pl/poznan/put/mcq/cli/Lcs.java @@ -7,7 +7,6 @@ import org.apache.commons.cli.ParseException; import org.apache.commons.math3.util.FastMath; import pl.poznan.put.circular.ImmutableAngle; -import pl.poznan.put.comparison.LCS; import pl.poznan.put.comparison.LCSv2; import pl.poznan.put.comparison.exception.IncomparableStructuresException; import pl.poznan.put.comparison.global.LCSGlobalResult; diff --git a/mcq-core/src/main/java/pl/poznan/put/comparison/LCSv2.java b/mcq-core/src/main/java/pl/poznan/put/comparison/LCSv2.java index 56677dd6..35f32145 100644 --- a/mcq-core/src/main/java/pl/poznan/put/comparison/LCSv2.java +++ b/mcq-core/src/main/java/pl/poznan/put/comparison/LCSv2.java @@ -106,27 +106,29 @@ public final GlobalResult compareGlobally( return createResult(r1, r2, bestDeltas, bestBegin, bestLength); } - private GlobalResult createResult(List target, List model, AngleSample deltas, int begin, int length) { + private GlobalResult createResult( + List target, List model, AngleSample deltas, int begin, int length) { final var targetFragment = - ImmutablePdbCompactFragment.of(target.subList(begin, begin + length)); - final var modelFragment = - ImmutablePdbCompactFragment.of(model.subList(begin, begin + length)); + ImmutablePdbCompactFragment.of(target.subList(begin, begin + length)); + final var modelFragment = ImmutablePdbCompactFragment.of(model.subList(begin, begin + length)); final var selectionModel = new StructureSelection("", Collections.singletonList(modelFragment)); final var selectionTarget = - new StructureSelection("", Collections.singletonList(targetFragment)); + new StructureSelection("", Collections.singletonList(targetFragment)); final List residueComparisons = - IntStream.range(begin, begin + length) - .mapToObj( - i -> ImmutableResidueComparison.of(target.get(i), model.get(i), Collections.emptyList())) - .collect(Collectors.toList()); + IntStream.range(begin, begin + length) + .mapToObj( + i -> + ImmutableResidueComparison.of( + target.get(i), model.get(i), Collections.emptyList())) + .collect(Collectors.toList()); final var fragmentComparison = - FragmentComparison.fromResidueComparisons( - residueComparisons, moleculeType.mainAngleTypes()); + FragmentComparison.fromResidueComparisons( + residueComparisons, moleculeType.mainAngleTypes()); final var fragmentMatch = - new FragmentMatch(targetFragment, modelFragment, false, 0, fragmentComparison); + new FragmentMatch(targetFragment, modelFragment, false, 0, fragmentComparison); final var selectionMatch = - new SelectionMatch( - selectionTarget, selectionModel, Collections.singletonList(fragmentMatch)); + new SelectionMatch( + selectionTarget, selectionModel, Collections.singletonList(fragmentMatch)); return ImmutableLCSGlobalResult.of(selectionMatch, deltas, selectionModel, selectionTarget); }