64 os <<
'[' << obj.
lb <<
';' << obj.
ub <<
']';
79 template<
typename T,
int N,
int M>
80 adoreMatrix<interval<T>, N, M>
create_interval(
const adoreMatrix<T, N, M>& lb,
const adoreMatrix<T, N, M>& ub)
82 adoreMatrix<interval<T>, N, M> result;
83 for (
int i = 0; i < N; i++)
85 for (
int j = 0; j < M; j++)
99 template<
typename T,
int N,
int M>
102 adoreMatrix<T, N, M> result;
103 for (
int i = 0; i < N; i++)
105 for (
int j = 0; j < M; j++)
107 result(i, j) = data(i, j).lb;
119 template<
typename T,
int N,
int M>
122 adoreMatrix<T, N, M> result;
123 for (
int i = 0; i < N; i++)
125 for (
int j = 0; j < M; j++)
127 result(i, j) = data(i, j).ub;
142 template<
typename T,
int N,
int M,
int K>
143 inline void imultiply(
const adoreMatrix<T, N, M>& lba,
const adoreMatrix<T, N, M>& uba,
const adoreMatrix<T, M, K>& lbb,
const adoreMatrix<T, M, K>& ubb, adoreMatrix<T, N, K>& lb, adoreMatrix<T, N, K>& ub)
145 adoreMatrix<interval<T>, N, M> a = create_interval<T, N, M>(lba, uba);
146 adoreMatrix<interval<T>, M, K> b = create_interval<T, M, K>(lbb, ubb);
147 adoreMatrix<interval<T>, N, K> c = a*b;
148 lb = lower_bound<T, N, K>(c);
149 ub = upper_bound<T, N, K>(c);
155 template<
typename T,
long N>
156 inline void imultiply(
const adoreMatrix<T, N, 1l>& lba,
const adoreMatrix<T, N, 1l>& uba,
const double& lbb,
const double& ubb, adoreMatrix<T, N, 1l>& lb, adoreMatrix<T, N, 1l>& ub)
158 adoreMatrix<interval<T>, N,1> a = create_interval<T, N, 1>(lba, uba);
160 adoreMatrix<interval<T>, N, 1> c = a*b;
161 lb = lower_bound<T, N, 1>(c);
162 ub = upper_bound<T, N, 1>(c);
168 template<
typename T,
int N,
int M,
int K>
169 inline void imultiply(
const adoreMatrix<
interval<T>, N, M>& a,
const adoreMatrix<
interval<T>, M, K>& b, adoreMatrix<T, N, K>& lb, adoreMatrix<T, N, K>& ub)
171 adoreMatrix<interval<T>, N, K> c = a*b;
172 lb = lower_bound<T, N, K>(c);
173 ub = upper_bound<T, N, K>(c);
183 lb = lower_bound<T>(c);
184 ub = upper_bound<T>(c);
190 inline void imultiply(
const double& lba,
const double& uba,
const double& lbb,
const double& ubb,
double& lb,
double& ub)
195 lb = lower_bound<double>(c);
196 ub = upper_bound<double>(c);
207 T lb = adore::mad::remainder<T>(
x.lb + M_PI_2, 2.0*
M_PI) - M_PI_2;
208 T ub =
x.ub - (
x.lb - lb);
211 bool lb_q41 = -M_PI_2 <= lb && lb <= M_PI_2;
212 bool ub_q41 = -M_PI_2 <= ub && ub <= M_PI_2;
213 bool ub_q23 = M_PI_2 <= lb && lb <=
M_PI + M_PI_2;
#define adoreMatrix
Definition: adoremath.h:31
bool operator!=(const interval< T > &lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:72
interval< double > idouble
Definition: intervalarithmetic.h:75
interval< T > atan2(interval< T > y, interval< T > x)
Definition: intervalarithmetic.h:234
adoreMatrix< T, N, M > lower_bound(const adoreMatrix< interval< T >, N, M > &data)
Definition: intervalarithmetic.h:100
bool operator>(const interval< T > &lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:69
interval< T > cos(interval< T > x)
Definition: intervalarithmetic.h:225
interval< int > iint
Definition: intervalarithmetic.h:77
adoreMatrix< interval< T >, N, M > create_interval(const adoreMatrix< T, N, M > &lb, const adoreMatrix< T, N, M > &ub)
Definition: intervalarithmetic.h:80
bool operator<(const interval< T > &lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:68
std::ostream & operator<<(std::ostream &os, const interval< T > &obj)
Definition: intervalarithmetic.h:62
bool operator<=(const interval< T > &lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:70
bool operator>=(const interval< T > &lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:71
T min(T a, T b, T c, T d)
Definition: adoremath.h:663
interval< T > sin(interval< T > x)
Definition: intervalarithmetic.h:204
void imultiply(const adoreMatrix< T, N, M > &lba, const adoreMatrix< T, N, M > &uba, const adoreMatrix< T, M, K > &lbb, const adoreMatrix< T, M, K > &ubb, adoreMatrix< T, N, K > &lb, adoreMatrix< T, N, K > &ub)
Definition: intervalarithmetic.h:143
adoreMatrix< T, N, M > upper_bound(const adoreMatrix< interval< T >, N, M > &data)
Definition: intervalarithmetic.h:120
interval< float > ifloat
Definition: intervalarithmetic.h:76
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
bool operator==(const interval< T > &lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:73
x0
Definition: adore_set_goal.py:25
x
Definition: adore_set_goal.py:30
y
Definition: adore_set_goal.py:31
x1
Definition: adore_set_pose.py:28
Definition: areaofeffectconverter.h:20
Definition: intervalarithmetic.h:30
interval< T > & operator+=(const interval< T > &rhs)
Definition: intervalarithmetic.h:39
friend interval< T > operator*(interval< T > lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:54
interval< T > & operator-=(const interval< T > &rhs)
Definition: intervalarithmetic.h:41
interval()
Definition: intervalarithmetic.h:34
interval(T x0, T x1)
Definition: intervalarithmetic.h:32
interval(T x)
Definition: intervalarithmetic.h:33
void setMinMax(T x0, T x1)
Definition: intervalarithmetic.h:37
friend interval< T > operator-(interval< T > lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:42
interval< T > operator-()
Definition: intervalarithmetic.h:55
interval< T > & operator*=(const interval< T > &rhs)
Definition: intervalarithmetic.h:43
void set(T lb, T ub)
Definition: intervalarithmetic.h:36
T ub
Definition: intervalarithmetic.h:31
friend interval< T > operator+(interval< T > lhs, const interval< T > &rhs)
Definition: intervalarithmetic.h:40
T lb
Definition: intervalarithmetic.h:31