:py:mod:`desdeo_emo.utilities.symmetric_vectors`
================================================

.. py:module:: desdeo_emo.utilities.symmetric_vectors


Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

   desdeo_emo.utilities.symmetric_vectors.shear
   desdeo_emo.utilities.symmetric_vectors.normalize
   desdeo_emo.utilities.symmetric_vectors.rotate
   desdeo_emo.utilities.symmetric_vectors.householder
   desdeo_emo.utilities.symmetric_vectors.rotate_toward
   desdeo_emo.utilities.symmetric_vectors.main



.. py:function:: shear(vectors, degrees: float = 5)

   Shear a set of vectors lying on the plane z=0 towards the z-axis, such that the
   resulting vectors 'degrees' angle away from the z axis.

   z is the last element of the vector, and has to be equal to zero.

   :param vectors: The final element of each vector should be zero.
   :type vectors: numpy.ndarray
   :param degrees: The angle that the resultant vectors make with the z axis. Unit is radians.
                   (the default is 5)
   :type degrees: float, optional


.. py:function:: normalize(vectors)

   Normalize a set of vectors.

   The length of the returned vectors will be unity.

   :param vectors: Set of vectors of any length, except zero.
   :type vectors: np.ndarray


.. py:function:: rotate(initial_vector, rotated_vector, other_vectors)

   Calculate the rotation matrix that rotates the initial_vector to the
   rotated_vector. Apply that rotation on other_vectors and return.
   Uses Householder reflections twice to achieve this.


.. py:function:: householder(vector)

   Return reflection matrix via householder transformation.


.. py:function:: rotate_toward(initial_vector, final_vector, other_vectors, degrees: float = 5)

   Rotate other_vectors (with the centre at initial_vector) towards final_vector
   by an angle degrees.

   :param initial_vector: Centre of the vectors to be rotated.
   :type initial_vector: np.ndarray
   :param final_vector: The final position of the center of other_vectors.
   :type final_vector: np.ndarray
   :param other_vectors: The array of vectors to be rotated
   :type other_vectors: np.ndarray
   :param degrees: The amount of rotation (the default is 5)
   :type degrees: float, optional

   :returns: * **rotated_vectors** (*np.ndarray*) -- The rotated vectors
             * **reached** (*bool*) -- True if final_vector has been reached


.. py:function:: main()


