Commit 4efb5cc9 authored by Jean-Marc Ronck's avatar Jean-Marc Ronck
Browse files

Merge branch 'master' of...

Merge branch 'master' of https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/MathPrettyPrinter
parents d3ef765d 5cdbff29
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Example
......@@ -10,4 +11,4 @@ script Example
end
x += 1;
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script ForLoop
......@@ -5,4 +6,4 @@ script ForLoop
for i = 1:2:9
sum += sum * i;
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script ForLoop2
......@@ -13,4 +14,4 @@ script ForLoop2
end
x += 1;
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script ForLoop3
......@@ -8,4 +9,4 @@ script ForLoop3
Cmat += A(i, j);
end
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Hadamard
......@@ -5,4 +6,4 @@ script Hadamard
Q^{2, 2} B = [1 + 1, 1 * 2; 1 - matC, 1 / matB];
A = A .* B;
A = A ./ B;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script If
......@@ -10,4 +11,4 @@ script If
else
result = 0;
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script If2
......@@ -10,4 +11,4 @@ script If2
else
result = 0;
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script If3
......@@ -12,4 +13,4 @@ script If3
else
result = 0;
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
import Calculations.*;
......@@ -10,4 +11,4 @@ script ImportTest
Q^{2, 2} matC = [1, 1; 1, 1];
matC = matB;
Q D = A;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Initialization
......@@ -6,4 +7,4 @@ script Initialization
Q^{2, 2} Cmat = [1, 1; 1, 1];
Q^{2, 2} D = [1, 2; 3, 4];
Q rational;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script MathExpressions
......@@ -6,4 +7,4 @@ script MathExpressions
Q matC = ((1 + 2) * (3 + 4))^2;
Q^{2, 2} D = ([1, 1; 1, 1] + [2, 2; 2, 2]) * ([3, 3; 3, 3] + [4, 4; 4, 4]);
Q E = (A + matB) % 5;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script MatrixWithMathExpression
......@@ -6,4 +7,4 @@ script MatrixWithMathExpression
Q^{2, 2} A = [1 + 1, 1 * 2; 1 - matC, 1 / matB];
A += A^2;
Q^{3, 2} D = ([1, 2, 3; 4, 5, 6] + [1, 2, 3; 4, 5, 6])';
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Nested
......@@ -13,4 +14,4 @@ script Nested
end
end
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script PowerWise
Q^{2} A = [1, 2].^2;
Q^{2} Bmat = ([1, 2] * [1, 2; 3, 4]).^2;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script SolEqu
Q^{3, 1} A = [3, 6, 2; 1, 2, 8; 7, 9, 4] \ [2; 3; 4];
Q^{3, 1} Bmat = ([3 / 2, 6 / 2, 2 / 2; 1 / 2, 2 / 2, 8 / 2; 7 / 2, 9 / 2, 4 / 2] + [3 / 2, 6 / 2, 2 / 2; 1 / 2, 2 / 2, 8 / 2; 7 / 2, 9 / 2, 4 / 2]) \ [2; 3; 4];
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script TimeWise
Q^{2} A = [2, 2] .* [1, 2];
Q^{2} Bmat = ([1, 2] + [3, 4]) .* [5, 6];
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Units
......@@ -7,4 +8,4 @@ script Units
Q(0 m * s : 10 m * s) F = 2 m * 1 s;
Q(0 m^2 : 10 m^2) D = 1 m * m;
Q(0 m^4 : 1000 m^4) E = ((1 m + 2 m) * (3 m + 4 m))^2;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Units2
......@@ -7,4 +8,4 @@ script Units2
Q(0 m : 10 m) D = 2 m;
Q(0 m : 10 m) E = 5 m;
Q(0 m^2 : 200 m^2) F = D * E + 3 m^2;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Arithmetic
//Variable Declaration
Q rational;
rational = 1 + 2 * 3;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Assignments
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment