⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logicop.htm

📁 This matrix C++ template class library is for performing common matrix operations in your C++ progra
💻 HTM
字号:
<html>
<head>
  <link rel=stylesheet href="styles.css" type="text/css">
  <title>Boolean Operations</title>
</head>
<body>

<h6 align=right>
<a href="binaryop.htm">Prev</a> |
<a href="manual.htm">Up</a> |
<a href="matdcmp.htm">Next</a>
</h6>

<h2>Boolean Operations</h2>

<p>
The following boolean operators and methods are available in the matrix class.
</p>

<pre><code><a href="#b1">1</a>. bool operator== (const matrix&lt;T&gt;&amp; <i>m1</i>, const matrix&lt;T&gt;&amp; <i>m2</i>);
<a href="#b2">2</a>. bool operator!= (const matrix&lt;T&gt;&amp; <i>m1</i>, const matrix&lt;T&gt;&amp; <i>m2</i>);

<a href="#b3">3</a>. bool isSquare () const;
<a href="#b4">4</a>. bool isSingular () const;
<a href="#b5">5</a>. bool isDiagonal () const;
<a href="#b6">6</a>. bool isScalar () const;
<a href="#b7">7</a>. bool isUnit () const;
<a href="#b8">8</a>. bool isNull () const;
<a href="#b9">9</a>. bool isSymmetric () const;
<a href="#b10">10</a>. bool isSkewSymmetric () const;
<a href="#b11">11</a>. bool isUpperTriangular () const;
<a href="#b12">12</a>. bool isLowerTriangular () const;
<a href="#b13">13</a>. bool isRowOrthogonal () const;
<a href="#b14">14</a>. bool isColOrthogonal () const;

</code></pre>

<p>
<ol>
<li><a name="b1"></a>Compares the matrix <i>m1</i> and <i>m2</i>, and returns <i>true</i> if they are equal; otherwise, it returns <i>false</i>.
</li><br><br>

<li><a name="b2"></a>Compares the matrix <i>m1</i> and <i>m2</i>, and returns <i>true</i> if they are not equal; otherwise, it returns <i>false</i>.</li><br><br>

<li><a name="b3"></a>Returns <i>true</i> if the matrix is a square matrix;
otherwise, it returns <i>false</i>.</li><br><br>

<li><a name="b4"></a>Returns <i>true</i> if the matrix is singular; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b5"></a>Returns <i>true</i> if the matrix is diagonal; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b6"></a>Returns <i>true</i> if the matrix is a scalar matrix; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b7"></a>Returns <i>true</i> if the matrix is a unit matrix; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b8"></a>Returns <i>true</i> if the matrix is a null matrix; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b9"></a>Returns <i>true</i> if the matrix is symmetric; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b10"></a>Returns <i>true</i> if the matrix is skew-symmetric; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b11"></a>Returns <i>true</i> if the matrix is upper triangular; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b12"></a>Returns <i>true</i> if the matrix is lower triangular; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b13"></a>Returns <i>true</i> if the matrix is row orthogonal; otherwise, it returns <i>false</i></li><br><br>

<li><a name="b14"></a>Returns <i>true</i> if the matrix is column orthogonal; otherwise, it returns <i>false</i></li><br><br>
</ol>
</p>

<h5>Examples</h5>

<pre><code>typedef matrix&lt;double&gt; Matrix;

Matrix A(5,5);

A.rand();
const Matrix B = A;

bool bVal = A == B;

bVal = B.isSingular(); 
bVal = B.isSymmetric();
bVal = B.isLowerTriangular();
bVal = B.isRowOrthogonal();

</code></pre>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -