mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 10:09:53 +01:00
[apps/sequence/sequence] Simplify isEmpty
This commit is contained in:
committed by
LeaNumworks
parent
9a3ce0df26
commit
94f89f37d7
@@ -104,14 +104,11 @@ bool Sequence::isDefined() {
|
||||
|
||||
bool Sequence::isEmpty() {
|
||||
RecordDataBuffer * data = recordData();
|
||||
switch (type()) {
|
||||
case Type::Explicit:
|
||||
return Function::isEmpty();
|
||||
case Type::SingleRecurrence:
|
||||
return Function::isEmpty() && data->initialConditionSize(0) == 0;
|
||||
default:
|
||||
return Function::isEmpty() && data->initialConditionSize(0) == 0 && data->initialConditionSize(1) == 0;
|
||||
}
|
||||
Type type = data->type();
|
||||
return Function::isEmpty() &&
|
||||
(type == Type::Explicit ||
|
||||
(data->initialConditionSize(0) == 0 &&
|
||||
(type == Type::SingleRecurrence || data->initialConditionSize(1) == 0)));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user