FineKernelToolKit 4.2.13
読み取り中…
検索中…
一致する文字列を見つけられません
GenMatrix.h
[詳解]
1#if !defined(__FK_GEN_MATRIX_HEADER__)
2#define __FK_GEN_MATRIX_HEADER__
3
4#include <FK/GenVector.h>
5#include <FK/Matrix.h>
6
7namespace FK {
9
19
20 friend class FK::fk_GenVector;
21
22 public:
23
25
30 fk_GenMatrix(int deg = 0);
31
34
37
39
49
52
54
67 bool operator ==(const fk_GenMatrix &) const;
68
70
83 bool operator !=(const fk_GenMatrix &) const;
84
86
89
92
94
107
109
122
124
143
146
148
156 void init(bool initFlg = true);
157
158 // 次数設定 (直前の値は保持)
160
166 void setDeg(int deg);
167
169
174 int getDeg(void) const;
175
177
184 void set(int row, int col, double value);
185
187
194 double get(int row, int col) const;
195
197
207 bool inverse(void);
208
210
213 void negate(void);
214
215
217
225 bool isRegular(void) const;
226
228
236 bool isSingular(void) const;
237
238#if !defined(FK_DOXYGEN_USER_PROCESS)
239 void Print(std::string = "") const;
240#endif
241
249
250 private:
251 std::vector<double> m;
252 std::vector<double>::size_type deg;
253
254 void MultVec(fk_GenVector &, const fk_GenVector &) const;
255 void MakeIdentMatrix(void);
256 void MakeZeroMatrix(void);
257 bool MatrixInverse(void);
258 };
259
261
262 // fk_GenVector との積演算
264
277
279
292
293 // 差演算子
295
308
310
325}
326
327#endif // !__FK_GEN_MATRIX_HEADER__
328
329/****************************************************************************
330 *
331 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
332 *
333 * Redistribution and use in source and binary forms,
334 * with or without modification, are permitted provided that the
335 * following conditions are met:
336 *
337 * - Redistributions of source code must retain the above
338 * copyright notice, this list of conditions and the
339 * following disclaimer.
340 *
341 * - Redistributions in binary form must reproduce the above
342 * copyright notice, this list of conditions and the
343 * following disclaimer in the documentation and/or
344 * other materials provided with the distribution.
345 *
346 * - Neither the name of the copyright holders nor the names
347 * of its contributors may be used to endorse or promote
348 * products derived from this software without specific
349 * prior written permission.
350 *
351 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
352 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
353 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
354 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
355 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
356 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
357 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
358 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
359 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
360 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
361 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
362 * POSSIBILITY OF SUCH DAMAGE.
363 *
364 ****************************************************************************/
365/****************************************************************************
366 *
367 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
368 *
369 * 本ソフトウェアおよびソースコードのライセンスは、基本的に
370 * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。
371 *
372 * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、
373 * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。
374 *
375 * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、
376 * および下記免責条項を含めること。
377 *
378 * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の
379 * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を
380 * 含めること。
381 *
382 * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の
383 * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または
384 * コントリビューターの名前を使用してはならない。
385 *
386 * 本ソフトウェアは、著作権者およびコントリビューターによって「現
387 * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、
388 * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ
389 * に限定されない、いかなる保証もないものとします。著作権者もコン
390 * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを
391 * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その
392 * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可
393 * 能性を知らされていたとしても、本ソフトウェアの使用によって発生
394 * した(代替品または代用サービスの調達、使用の喪失、データの喪失、
395 * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、
396 * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に
397 * ついて、一切責任を負わないものとします。
398 *
399 ****************************************************************************/
任意次元正方行列を管理するクラス
Definition GenMatrix.h:18
fk_GenMatrix & operator+=(const fk_GenMatrix &)
行列和代入演算子
bool isSingular(void) const
非正則(特異)判定関数
fk_GenMatrix & operator-=(const fk_GenMatrix &)
行列差代入演算子
friend fk_GenMatrix operator-(const fk_GenMatrix &, const fk_GenMatrix &)
行列差二項演算子
double get(int row, int col) const
成分値取得関数
bool operator!=(const fk_GenMatrix &) const
異値比較演算子
friend fk_GenMatrix operator+(const fk_GenMatrix &, const fk_GenMatrix &)
行列和二項演算子
bool isRegular(void) const
正則判定関数
bool inverse(void)
逆行列化関数
fk_GenMatrix & operator=(const fk_GenMatrix &)
単純代入演算子
void setDeg(int deg)
次元数設定関数
fk_GenMatrix & operator*=(const fk_GenMatrix &)
行列積代入演算子
friend fk_GenVector operator*(const fk_GenMatrix &, const fk_GenVector &)
ベクトル変換二項演算子
void init(bool initFlg=true)
初期化関数
fk_GenMatrix(const fk_GenMatrix &)
コピーコンストラクタ
void set(int row, int col, double value)
成分値設定関数
bool operator==(const fk_GenMatrix &) const
同値比較演算子
fk_GenMatrix operator!(void) const
逆行列取得演算子
int getDeg(void) const
次元数取得関数
void negate(void)
転置化関数
fk_GenMatrix(int deg=0)
コンストラクタ
任意次元ベクトルを管理するクラス
Definition GenVector.h:20
Fine Kernel Toolkit 名前空間
Definition Angle.h:6
fk_Color operator+(const fk_Color &, const fk_Color &)
色要素和二項演算子
fk_Color operator-(const fk_Color &, const fk_Color &)
色要素差二項演算子
fk_Color operator*(const fk_Color &, double)
実数倍二項演算子1