test_class.declarator: reference
test_class.modifier: private static
test_class.original_string: private static List<Vector3D> reference;
test_class.type: List<Vector3D>
test_class.var_name: reference
test_class.declarator: candidate
test_class.modifier: private static
test_class.original_string: private static List<Vector3D> candidate;
test_class.type: List<Vector3D>
test_class.var_name: candidate
test_class.file: singa-mathematics/src/test/java/bio/singa/mathematics/algorithms/superimposition/VectorQuaternionSuperimposerTest.java
test_class.identifier: VectorQuaternionSuperimposerTest
test_case.body: @Test
      void calculateSuperimposition() {
          VectorSuperimposition vectorSuperimposition = VectorQuaternionSuperimposer.calculateVectorSuperimposition(reference, candidate);
          assertVectorEquals(new Vector3D(0.34500000000000375, 2.4529999999999923, 5.3240000000000025),
                  vectorSuperimposition.getTranslation(), 0.0);
          assertMatrixEquals(new RegularMatrix(new double[][] {{0.19,  0.98, 0.07},{-0.71, 0.09, 0.70}, {0.68, -0.18, 0.71}}),
                  vectorSuperimposition.getRotation(), 1e-2);
      }
test_case.class_method_signature: VectorQuaternionSuperimposerTest.calculateSuperimposition()
test_case.full_signature: @Test void calculateSuperimposition()
test_case.identifier: calculateSuperimposition
test_case.invocations: calculateVectorSuperimposition assertVectorEquals getTranslation assertMatrixEquals getRotation
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void calculateSuperimposition()
focal_class.file: singa-mathematics/src/main/java/bio/singa/mathematics/algorithms/superimposition/VectorQuaternionSuperimposer.java
focal_class.identifier: VectorQuaternionSuperimposer
focal_class.class_method_signature: VectorQuaternionSuperimposer.VectorQuaternionSuperimposer(List<Vector3D> reference, List<Vector3D> candidate)
focal_class.full_signature: public  VectorQuaternionSuperimposer(List<Vector3D> reference, List<Vector3D> candidate)
focal_class.identifier: VectorQuaternionSuperimposer
focal_class.modifiers: public
focal_class.parameters: (List<Vector3D> reference, List<Vector3D> candidate)
focal_class.signature:  VectorQuaternionSuperimposer(List<Vector3D> reference, List<Vector3D> candidate)
focal_class.class_method_signature: VectorQuaternionSuperimposer.calculateVectorSuperimposition(List<Vector3D> reference, List<Vector3D> candidate)
focal_class.full_signature: public static VectorSuperimposition<Vector3D> calculateVectorSuperimposition(List<Vector3D> reference, List<Vector3D> candidate)
focal_class.identifier: calculateVectorSuperimposition
focal_class.modifiers: public static
focal_class.parameters: (List<Vector3D> reference, List<Vector3D> candidate)
focal_class.return: VectorSuperimposition<Vector3D>
focal_class.signature: VectorSuperimposition<Vector3D> calculateVectorSuperimposition(List<Vector3D> reference, List<Vector3D> candidate)
focal_class.class_method_signature: VectorQuaternionSuperimposer.toTranslationMatrix(Vector3D translation)
focal_class.full_signature: private static SquareMatrix toTranslationMatrix(Vector3D translation)
focal_class.identifier: toTranslationMatrix
focal_class.modifiers: private static
focal_class.parameters: (Vector3D translation)
focal_class.return: SquareMatrix
focal_class.signature: SquareMatrix toTranslationMatrix(Vector3D translation)
focal_class.class_method_signature: VectorQuaternionSuperimposer.center()
focal_class.full_signature: @Override protected void center()
focal_class.identifier: center
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void center()
focal_class.class_method_signature: VectorQuaternionSuperimposer.calculateSuperimposition()
focal_class.full_signature: @Override protected VectorSuperimposition<Vector3D> calculateSuperimposition()
focal_class.identifier: calculateSuperimposition
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: VectorSuperimposition<Vector3D>
focal_class.signature: VectorSuperimposition<Vector3D> calculateSuperimposition()
focal_class.class_method_signature: VectorQuaternionSuperimposer.applyMapping()
focal_class.full_signature: @Override protected void applyMapping()
focal_class.identifier: applyMapping
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void applyMapping()
focal_class.superclass: extends AbstractSuperimposer<Vector3D>
focal_method.body: @Override
      protected VectorSuperimposition<Vector3D> calculateSuperimposition() {
          // center point clouds at origin
          center();
          // do magic quaternion stuff
          Quaternion quaternion = Quaternions.relativeOrientation(shiftedReference, shiftedCandidate);
          Vector3D ytrans = candidateCentroid.additivelyInvert();
          SquareMatrix quaternionMatrix = quaternion.toMatrixRepresentation();
          Matrix rottrans = toTranslationMatrix(referenceCentroid).multiply(quaternionMatrix.multiply(toTranslationMatrix(ytrans)));
          double[][] rotationElements = new double[][]{
                  {rottrans.getElement(0, 0), rottrans.getElement(1, 0), rottrans.getElement(2, 0)},
                  {rottrans.getElement(0, 1), rottrans.getElement(1, 1), rottrans.getElement(2, 1)},
                  {rottrans.getElement(0, 2), rottrans.getElement(1, 2), rottrans.getElement(2, 2)}};
          rotation = new SquareMatrix(rotationElements);
          translation = new Vector3D(rottrans.getElement(0, 3),
                  rottrans.getElement(1, 3), rottrans.getElement(2, 3));
          //apply mappings and calculate RMSD
          applyMapping();
          calculateRMSD();
  
          return new VectorSuperimposition<>(rmsd, translation, rotation, reference, candidate, mappedCandidate);
      }
focal_method.class_method_signature: VectorQuaternionSuperimposer.calculateSuperimposition()
focal_method.full_signature: @Override protected VectorSuperimposition<Vector3D> calculateSuperimposition()
focal_method.identifier: calculateSuperimposition
focal_method.invocations: center relativeOrientation additivelyInvert toMatrixRepresentation multiply toTranslationMatrix multiply toTranslationMatrix getElement getElement getElement getElement getElement getElement getElement getElement getElement getElement getElement getElement applyMapping calculateRMSD
focal_method.modifiers: @Override protected
focal_method.parameters: ()
focal_method.return: VectorSuperimposition<Vector3D>
focal_method.signature: VectorSuperimposition<Vector3D> calculateSuperimposition()