Identity Property in Cayley Table
<p>I am working on a project which requires me to discern if the cayley tables in my text files, have identity, associative, inverse, and abelian properties.. I am currently working on the identity function, and while I believe I must use two nested for loops to cycle through the rows and columns of the tables. I am unable to find anything which may push me in the right direction, any help is appreciated. Thanks Jessica</p>

<p>Just wanted to add an update: This is what I finally came up with, posting just in case it could still use work. Many thanks. </p>

<pre><code>group_el Group::getIdentity()
{
for (int i=0; i&lt;order; i++)
   {
    bool identIsi = true;
    for (int j=0; j&lt;order; j++)
       {
        if ((op(i,j)==i) &amp;&amp; (op(j,i)==i))  //if i*j =i same as j*i = i then i is identity
          {
            return i; 
          }
        else 
          {
            identIsi = false;
          }
       }
    }
</code></pre>

<p>return NO_IDENTITY;
}       </p>
