Skip to content

Commit

Permalink
Add redundant algorithm (modelica#4284)
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Jan 29, 2024
1 parent 94a7873 commit d156b9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Modelica/Math/BooleanVectors.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function allTrue
extends Modelica.Icons.Function;
input Boolean b[:] "Boolean vector";
output Boolean result = size(b, 1) > 0 and min(b) "= true, if all elements of b are true";
algorithm
annotation (Inline = true, Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down Expand Up @@ -48,6 +49,7 @@ function andTrue
extends Modelica.Icons.Function;
input Boolean b[:] "Boolean vector";
output Boolean result = min(b) "= true, if all elements of b are true";
algorithm
annotation (Inline = true, Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down Expand Up @@ -91,6 +93,7 @@ function anyTrue
extends Modelica.Icons.Function;
input Boolean b[:] "Boolean vector";
output Boolean result = max(b) "= true, if at least one element of b is true";
algorithm
annotation (Inline = true, Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down

0 comments on commit d156b9b

Please sign in to comment.