FineKernelToolKit 4.2.13
読み取り中…
検索中…
一致する文字列を見つけられません
GenVector.h
[詳解]
1#if !defined(__FK_GEN_VECTOR_HEADER__)
2#define __FK_GEN_VECTOR_HEADER__
3
4#include <FK/Vector.h>
5
6namespace FK {
7 class fk_GenMatrix;
8
10
21
22 friend class fk_GenMatrix;
23
24 public:
25
27
34 fk_GenVector(int deg = 0);
35
37
42 fk_GenVector(std::vector<double> &array);
43
45
51 fk_GenVector(int deg, double *array);
52
55
58
61
64
66
73 fk_GenVector & operator -(void) const;
74
76
79
81
93 bool operator ==(const fk_GenVector &) const;
94
96
108 bool operator !=(const fk_GenVector &) const;
109
111
114
117
120
123
125
136
138
151
153
166
168
181
183
196
198
201
203
208 void resize(int deg);
209
210 // 成分値設定関数
219 bool set(int ID, double value);
220
222
226 int size(void) const;
227
229
235 double get(int ID) const; // 値取得
236
238
249 double norm(void) const;
250
252
263 double norm2(void) const;
264
266
280 bool normalize(void);
281
283
288 void init(bool degFlg = false);
289
291
296 bool isZero(void) const;
297
299
321 bool replace(int s, fk_GenVector &Q);
322
324
346 bool replace(int s, fk_Vector &Q);
347
349
371 bool replace(int s, fk_HVector &Q);
372
374
396 bool add(int s, fk_GenVector &Q);
397
399
421 bool add(int s, fk_Vector &Q);
422
424
446 bool add(int s, fk_HVector &Q);
447
449
471 bool sub(int s, fk_GenVector &Q);
472
474
496 bool sub(int s, fk_Vector &Q);
497
499
521 bool sub(int s, fk_HVector &Q);
522
524
533 fk_GenVector div(int s, int e);
534
535#if !defined(FK_DOXYGEN_USER_PROCESS)
536 void Print(void) const;
537 void Print(std::string) const;
538#endif
539
542
543 friend double operator *(const fk_GenVector &, const fk_GenVector &);
546 friend fk_GenVector operator *(const fk_GenVector &, double);
547 friend fk_GenVector operator *(double, const fk_GenVector &);
548 friend fk_GenVector operator /(const fk_GenVector &, double);
550
552
553 private:
554
555 std::vector<double> v;
556 };
557
559
561
577 double operator *(const fk_GenVector &P, const fk_GenVector &Q);
578
580
590
592
602
604
613
615
624
626
633
634
636
656}
657
658#endif // !__FK_GEN_VECTOR_HEADER__
659
660/****************************************************************************
661 *
662 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
663 *
664 * Redistribution and use in source and binary forms,
665 * with or without modification, are permitted provided that the
666 * following conditions are met:
667 *
668 * - Redistributions of source code must retain the above
669 * copyright notice, this list of conditions and the
670 * following disclaimer.
671 *
672 * - Redistributions in binary form must reproduce the above
673 * copyright notice, this list of conditions and the
674 * following disclaimer in the documentation and/or
675 * other materials provided with the distribution.
676 *
677 * - Neither the name of the copyright holders nor the names
678 * of its contributors may be used to endorse or promote
679 * products derived from this software without specific
680 * prior written permission.
681 *
682 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
683 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
684 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
685 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
686 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
687 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
688 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
689 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
690 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
691 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
692 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
693 * POSSIBILITY OF SUCH DAMAGE.
694 *
695 ****************************************************************************/
696/****************************************************************************
697 *
698 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
699 *
700 * 本ソフトウェアおよびソースコードのライセンスは、基本的に
701 * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。
702 *
703 * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、
704 * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。
705 *
706 * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、
707 * および下記免責条項を含めること。
708 *
709 * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の
710 * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を
711 * 含めること。
712 *
713 * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の
714 * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または
715 * コントリビューターの名前を使用してはならない。
716 *
717 * 本ソフトウェアは、著作権者およびコントリビューターによって「現
718 * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、
719 * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ
720 * に限定されない、いかなる保証もないものとします。著作権者もコン
721 * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを
722 * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その
723 * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可
724 * 能性を知らされていたとしても、本ソフトウェアの使用によって発生
725 * した(代替品または代用サービスの調達、使用の喪失、データの喪失、
726 * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、
727 * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に
728 * ついて、一切責任を負わないものとします。
729 *
730 ****************************************************************************/
任意次元正方行列を管理するクラス
Definition GenMatrix.h:18
任意次元ベクトルを管理するクラス
Definition GenVector.h:20
fk_GenVector(const fk_Vector &)
fk_Vector からのコピーコンストラクタ
void init(bool degFlg=false)
初期化関数
fk_GenVector & operator-(void) const
単項マイナス演算子
fk_GenVector(int deg, double *array)
コンストラクタ3
bool add(int s, fk_HVector &Q)
部分加算関数3
friend double operator*(const fk_GenVector &, const fk_GenVector &)
内積二項演算子
bool set(int ID, double value)
bool sub(int s, fk_HVector &Q)
部分減算関数3
bool operator==(const fk_GenVector &) const
同値比較演算子
bool sub(int s, fk_GenVector &Q)
部分減算関数1
double norm2(void) const
ノルム平方値取得関数
friend fk_GenVector operator/(const fk_GenVector &, double)
実数商二項演算子
fk_GenVector div(int s, int e)
部分抽出関数
fk_GenVector & operator=(const fk_GenVector &)
単純代入演算子
fk_GenVector(std::vector< double > &array)
コンストラクタ2
int size(void) const
次元数取得関数
fk_GenVector(int deg=0)
コンストラクタ1
fk_GenVector & operator/=(double)
実数商代入演算子
friend fk_GenVector operator+(const fk_GenVector &, const fk_GenVector &)
ベクトル和二項演算子
bool isZero(void) const
零ベクトル判定関数
fk_GenVector & operator*=(double d)
実数積演算子
fk_GenVector(const fk_GenVector &)
コピーコンストラクタ
void resize(int deg)
次元数設定関数
fk_GenVector & operator-=(const fk_GenVector &)
単項差代入演算子
bool normalize(void)
正規化関数
double get(int ID) const
成分値取得関数
bool replace(int s, fk_GenVector &Q)
部分置換関数1
bool operator!=(const fk_GenVector &) const
異値比較演算子
bool sub(int s, fk_Vector &Q)
部分減算関数2
bool add(int s, fk_GenVector &Q)
部分加算関数1
fk_GenVector(const fk_HVector &)
fk_HVector からのコピーコンストラクタ
double norm(void) const
ノルム取得関数
bool replace(int s, fk_HVector &Q)
部分置換関数3
fk_GenVector & operator+=(const fk_GenVector &)
単項和代入演算子
bool replace(int s, fk_Vector &Q)
部分置換関数2
bool add(int s, fk_Vector &Q)
部分加算関数2
friend fk_GenVector operator^(const fk_GenVector &, const fk_GenVector &)
外積二項演算子
4次元ベクトルを管理するクラス
Definition Vector.h:497
3次元ベクトルを管理するクラス
Definition Vector.h:45
Fine Kernel Toolkit 名前空間
Definition Angle.h:6
fk_Color operator+(const fk_Color &, const fk_Color &)
色要素和二項演算子
fk_Color operator/(const fk_Color &, double)
実数商二項演算子
fk_Draw operator^(fk_Draw, fk_Draw)
描画モード用ビット XOR 演算子
fk_Color operator-(const fk_Color &, const fk_Color &)
色要素差二項演算子
fk_Color operator*(const fk_Color &, double)
実数倍二項演算子1