📄 unaryop.htm
字号:
<html>
<head>
<link rel=stylesheet href="styles.css" type="text/css">
<title>Unary operators</title>
</head>
<body>
<h6 align=right>
<a href="assignop.htm">Prev</a> |
<a href="manual.htm">Up</a> |
<a href="binaryop.htm">Next</a>
</h6>
<h2>Unary operators</h2>
<p>
The following unary operators are available for the matrix class.
</p>
<pre><code><a href="#u1">1</a>. matrix<T> operator+ () const;
<a href="#u2">2</a>. matrix<T> operator- () const;
<a href="#u3">3</a>. matrix<T> operator~ () const;
<a href="#u4">4</a>. matrix<T> operator! () const;
</code></pre>
<p>
<ol>
<li><a name="u1"></a>Returns the same matrix object.</li><br><br>
<li><a name="u2"></a>Returns a new matrix object constructed after applying the negative operator on all of the matrix elements.</li><br><br>
<li><a name="u1"></a>Returns the transpose of the matrix object.
</li><br><br>
<li><a name="u1"></a>Returns the inverse of the matrix object.</li><br><br>
</ol>
</p>
<h5>Examples</h5>
<pre><code>typedef matrix<double> Matrix;
Matrix A(5,5), B(5,5);
A.rand();
B = +A;
B = -A;
B = ~A; // Returns the transpose of A
B = !A; // Returns the inverse of A
</code></pre>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -