ARCS6 AR6-REV.24062600
読み取り中…
検索中…
一致する文字列を見つけられません
SshapeGenerators.hh
[詳解]
1
8//
9// Copyright (C) 2011-2021 Yokokura, Yuki
10// This program is free software;
11// you can redistribute it and/or modify it under the terms of the FreeBSD License.
12// For details, see the License.txt file.
13
14#ifndef SSHAPEGENERATORS
15#define SSHAPEGENERATORS
16
17#include <cassert>
18#include <array>
19#include "SshapeGenerator.hh"
20
21// ARCS組込み用マクロ
22#ifdef ARCS_IN
23 // ARCSに組み込まれる場合
24 #include "ARCSassert.hh"
25 #include "ARCSeventlog.hh"
26#else
27 // ARCSに組み込まれない場合
28 #define arcs_assert(a) (assert(a))
29 #define PassedLog()
30 #define EventLog(a)
31 #define EventLogVar(a)
32#endif
33
34namespace ARCS { // ARCS名前空間
38template <size_t N, size_t M>
40 public:
43 : SshapeGeneratorVec()
44 {
45 PassedLog();
46 }
47
51 // :
52 {
53
54 }
55
60
64 void GetShapedSignal(const Matrix<1,M>& input, Matrix<1,M>& output){
65 for(size_t i = 1; i <= M; ++i){
66 output[i] = SshapeGeneratorVec[i-1].GetShapedSignal(input[i]);
67 }
68 }
69
74 Matrix<1,M> ret;
75 GetShapedSignal(input, ret);
76 return ret;
77 }
78
81 void SetInitialValue(const Matrix<1,M>& init){
82 for(size_t i = 1; i <= M; ++i) SshapeGeneratorVec[i-1].SetInitialValue(init[i]);
83 }
84
85 private:
86 SshapeGenerators(const SshapeGenerators&) = delete;
87 const SshapeGenerators& operator=(const SshapeGenerators&) = delete;
88 std::array<SshapeGenerator<N>, M> SshapeGeneratorVec;
89
90};
91}
92
93#endif
94
ARCS イベントログクラス
#define PassedLog()
イベントログ用マクロ(ファイルと行番号のみ記録版)
Definition ARCSeventlog.hh:26
ARCS用ASSERTクラス
S字軌道生成器
行列/ベクトル計算クラス(テンプレート版)
Definition Matrix.hh:44
S字軌道生成器
Definition SshapeGenerators.hh:39
void GetShapedSignal(const Matrix< 1, M > &input, Matrix< 1, M > &output)
S字軌道の最新値を取得する関数(引数で返す版)
Definition SshapeGenerators.hh:64
void SetInitialValue(const Matrix< 1, M > &init)
S字軌道の初期値を設定する関数
Definition SshapeGenerators.hh:81
~SshapeGenerators()
デストラクタ
Definition SshapeGenerators.hh:57
SshapeGenerators()
コンストラクタ
Definition SshapeGenerators.hh:42
SshapeGenerators(SshapeGenerators &&r)
ムーブコンストラクタ
Definition SshapeGenerators.hh:50
Matrix< 1, M > GetShapedSignal(const Matrix< 1, M > &input)
S字軌道の最新値を取得する関数(ベクトルで返す版)
Definition SshapeGenerators.hh:73