//                                               -*- C++ -*-
/**
 *  @file  CorrelationMatrix.cxx
 *  @brief The class CorrelationMatrix implements correlation matrices
 *
 *  Copyright (C) 2005-2013 EDF-EADS-Phimeca
 *
 *  This library is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  @author schueller
 *  @date   2012-04-18 17:56:46 +0200 (Wed, 18 Apr 2012)
 */
#include "CorrelationMatrix.hxx"

BEGIN_NAMESPACE_OPENTURNS



CLASSNAMEINIT(CorrelationMatrix);

/* Default constructor */
CorrelationMatrix::CorrelationMatrix()
  : CovarianceMatrix(0)
{
  // Nothing to do
}

/* Constructor with size (dim, which is the same for nbRows_ and nbColumns_ )*/
CorrelationMatrix::CorrelationMatrix(const UnsignedLong dim)
  : CovarianceMatrix(dim)
{
  // Nothing to do
}

/* Constructor from external collection */
/* If the dimensions of the matrix and of the collection */
/* do not match, either the collection is truncated */
/* or the rest of the matrix is filled with zeros */
CorrelationMatrix::CorrelationMatrix(const UnsignedLong dim,
                                     const Collection<NumericalScalar> &elementsValues)
  : CovarianceMatrix(dim, elementsValues)
{
  // Nothing to do
}

/* Constructor with implementation */
CorrelationMatrix::CorrelationMatrix(const Implementation & i)
  : CovarianceMatrix(i)
{
  // Nothing to do
}

/* String converter */
String CorrelationMatrix::__repr__() const
{
  checkSymmetry();
  return OSS() << "class=" << getClassName()
         << " dimension=" << this->getDimension()
         << " implementation=" << getImplementation()->__repr__();
}

/* CorrelationMatrix transpose */
CorrelationMatrix CorrelationMatrix::transpose () const
{
  return *this;
}

/* CorrelationMatrix multiplication (must have consistent dimensions) */
CorrelationMatrix CorrelationMatrix::operator * (const IdentityMatrix & m) const
{
  return *this;
}

END_NAMESPACE_OPENTURNS
