// Path: src/main/java/pitt/search/semanticvectors/vectors/ComplexVector.java
// public static enum Mode {
//   /** Uses a nonnegative 16 bit short for each phase angle.  The value -1 is reserved for
//    * representing the complex number zero, i.e., there is no entry in this dimension. */
//   POLAR_DENSE,
//   /** Uses a pair of 16 bit shorts for each (offset, phase angle) pair. */
//   POLAR_SPARSE,
//   /** Uses a pair of 32 bit floats for each (real, imaginary) complex coordinate. */
//   CARTESIAN,
//   /** As above, but with normalization to unit length and the hermitian scalar product
//    *  instead of the alternatives proposed by Plate */
//   HERMITIAN
// }


import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.logging.Logger;
import pitt.search.semanticvectors.vectors.ComplexVector.Mode;

package pitt.search.semanticvectors.vectors;




/**
 * Complex number utilities class.
 *
 * Contains static methods for various operation on complex vectors.
 *
 * @author Lance De Vine
 */
public class ComplexVectorUtils {
  public static final Logger logger = Logger.getLogger(RealVector.class.getCanonicalName());

  /**
   * Superposes vec2 with vec1.
   * vec1 is in CARTESIAN mode.
   * vec2 is in POLAR mode.
   */
  public static void superposeWithAngle( ComplexVector vec1, ComplexVector vec2  ) {
    int dim =  vec1.getDimension();
    assert(dim == vec2.getDimension());

// Path: src/main/java/pitt/search/semanticvectors/vectors/ComplexVector.java
// public static enum Mode {
//   /** Uses a nonnegative 16 bit short for each phase angle.  The value -1 is reserved for
//    * representing the complex number zero, i.e., there is no entry in this dimension. */
//   POLAR_DENSE,
//   /** Uses a pair of 16 bit shorts for each (offset, phase angle) pair. */
//   POLAR_SPARSE,
//   /** Uses a pair of 32 bit floats for each (real, imaginary) complex coordinate. */
//   CARTESIAN,
//   /** As above, but with normalization to unit length and the hermitian scalar product
//    *  instead of the alternatives proposed by Plate */
//   HERMITIAN
// }


// Path: src/main/java/pitt/search/semanticvectors/vectors/ComplexVectorUtils.java
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.logging.Logger;
import pitt.search.semanticvectors.vectors.ComplexVector.Mode;

package pitt.search.semanticvectors.vectors;




/**
 * Complex number utilities class.
 *
 * Contains static methods for various operation on complex vectors.
 *
 * @author Lance De Vine
 */
public class ComplexVectorUtils {
  public static final Logger logger = Logger.getLogger(RealVector.class.getCanonicalName());

  /**
   * Superposes vec2 with vec1.
   * vec1 is in CARTESIAN mode.
   * vec2 is in POLAR mode.
   */
  public static void superposeWithAngle( ComplexVector vec1, ComplexVector vec2  ) {
    int dim =  vec1.getDimension();
    assert(dim == vec2.getDimension());

    assert(vec1.getOpMode() == ComplexVector.Mode.CARTESIAN || vec1.getOpMode() == ComplexVector.Mode.HERMITIAN);
