Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 1.38 KB

call_operator.rst

File metadata and controls

50 lines (31 loc) · 1.38 KB

operator()

.. cpp:namespace:: libsemigroups::StaticMatrix<PlusOp, ProdOp, ZeroOp, OneOp, R, C, Scalar>

.. cpp:function:: scalar_reference operator()(size_t const r, size_t const c)

   Returns a reference to the specified entry of the matrix.

   :param r: the index of the row of the entry
   :param c: the index of the column of the entry

   :returns: A value of type :cpp:any:`scalar_reference`.

   :exceptions:
     this function guarantees not to throw a :cpp:any:`LibsemigroupsException`.

   :complexity:
     Constant

   .. warning::
      No checks on the validity of the parameters ``r`` and ``c`` are
      performed.

.. cpp:function:: scalar_const_reference operator()(size_t const r, size_t const c) const

   Returns a const reference to the specified entry of the matrix.

   :param r: the index of the row of the entry
   :param c: the index of the column of the entry

   :returns: A value of type :cpp:any:`scalar_const_reference`.

   :exceptions:
     this function guarantees not to throw a :cpp:any:`LibsemigroupsException`.

   :complexity:
     Constant

   .. warning::
      No checks on the validity of the parameters ``r`` and ``c`` are
      performed.