.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OESquareMatrix


.. _OEMath_OESquareMatrix:

.. oe:class:: OESquareMatrix

   .. oe:api::

      class OESquareMatrix : public OEMatrix

   :ref:`OESquareMatrix <OEMath_OESquareMatrix>` class represents a square matrix.

   Following methods are publicly inherited from :ref:`OEMatrix <OEMath_OEMatrix>`:
    * :oe:meth:`Clear<OEMath::OEMatrix::Clear>`
    * :oe:meth:`GetData<OEMath::OEMatrix::GetData>`
    * :oe:meth:`GetNumColumns<OEMath::OEMatrix::GetNumColumns>`
    * :oe:meth:`GetNumRows<OEMath::OEMatrix::GetNumRows>`
    * :oe:meth:`SetRowData<OEMath::OEMatrix::SetRowData>`
    * :oe:meth:`Transpose<OEMath::OEMatrix::Transpose>`

   The :ref:`OESquareMatrix <OEMath_OESquareMatrix>` class defines the following public methods:
    * :oe:meth:`Resize<OEMath::OEMatrix::Resize>`

   .. oe:method:: Constructors

      .. oe:language:: c++ java csharp

         .. oe:api::

            OESquareMatrix()
            OESquareMatrix(const unsigned numRows,
                           const double initialValue = 0.0)
            OESquareMatrix(const OESquareMatrix&)

      .. oe:language:: python

         .. oe:api:: python

            OESquareMatrix() -> OESquareMatrix
            OESquareMatrix(numRows: int, initialValue: float = 0.0) -> OESquareMatrix
            OESquareMatrix(arg2: OESquareMatrix) -> OESquareMatrix

      Default and copy constructors.

      The default constructor creates an empty matrix. The second overload creates a matrix
      with *numRows* rows and columns, with all the values set to zero.  The
      third overload creates a matrix with *numRows* rows and columns, with all the 
      values set to *initialValue*.

   .. oe:method:: operator=
      :language: c++
  
      .. oe:api::

         OESquareMatrix& operator=(const OESquareMatrix& rhs)

      Assignment operator for :ref:`OESquareMatrix <OEMath_OESquareMatrix>`.

      Assignment operator.


   .. oe:method:: Resize
        
      .. oe:language:: c++ java csharp

         .. oe:api::

            void Resize(const unsigned numRow, const double initialValue = 0.0)

      .. oe:language:: python

         .. oe:api:: python

            Resize(numRow: int, initialValue: float = 0.0) -> None

      Resize the matrix to *numRows* rows and columns.  The matrix is initialized 
      with *zero*, unless *initialValue* is provided.
