summaryrefslogtreecommitdiff
path: root/content/math
diff options
context:
space:
mode:
Diffstat (limited to 'content/math')
-rw-r--r--content/math/math.tex2
-rw-r--r--content/math/tables/stuff.tex2
-rw-r--r--content/math/transforms/andTransform.cpp4
-rw-r--r--content/math/transforms/bitwiseTransforms.cpp6
-rw-r--r--content/math/transforms/orTransform.cpp4
-rw-r--r--content/math/transforms/xorTransform.cpp2
6 files changed, 10 insertions, 10 deletions
diff --git a/content/math/math.tex b/content/math/math.tex
index 7764d54..5899c97 100644
--- a/content/math/math.tex
+++ b/content/math/math.tex
@@ -7,7 +7,7 @@
\end{itemize}
\sourcecode{math/longestIncreasingSubsequence.cpp}
\end{algorithm}
-\vfill\null\columnbreak
+\columnbreak
\begin{algorithm}{Zykel Erkennung}
\begin{methods}
diff --git a/content/math/tables/stuff.tex b/content/math/tables/stuff.tex
index 82f2d3f..9ad4739 100644
--- a/content/math/tables/stuff.tex
+++ b/content/math/tables/stuff.tex
@@ -3,7 +3,7 @@
\hline
\multicolumn{2}{|c|}{Verschiedenes} \\
\hline
- Türme von Hanoi, minimale Schirttzahl: &
+ Türme von Hanoi, minimale Schrittzahl: &
$T_n = 2^n - 1$ \\
\#Regionen zwischen $n$ Geraden &
diff --git a/content/math/transforms/andTransform.cpp b/content/math/transforms/andTransform.cpp
index 9e40c74..87bae0b 100644
--- a/content/math/transforms/andTransform.cpp
+++ b/content/math/transforms/andTransform.cpp
@@ -3,6 +3,6 @@ void fft(vector<ll>& a, bool inv = false) {
for (int s = 1; s < n; s *= 2) {
for (int i = 0; i < n; i += 2 * s) {
for (int j = i; j < i + s; j++) {
- ll& u = a[j], &v = a[j + s];
- tie(u, v) = inv ? pair(u - v, v) : pair(u + v, v);
+ ll &u = a[j], &v = a[j + s];
+ u = inv ? u - v : u + v;
}}}}
diff --git a/content/math/transforms/bitwiseTransforms.cpp b/content/math/transforms/bitwiseTransforms.cpp
index 17f3163..c0f6e50 100644
--- a/content/math/transforms/bitwiseTransforms.cpp
+++ b/content/math/transforms/bitwiseTransforms.cpp
@@ -3,9 +3,9 @@ void bitwiseConv(vector<ll>& a, bool inv = false) {
for (int s = 1; s < n; s *= 2) {
for (int i = 0; i < n; i += 2 * s) {
for (int j = i; j < i + s; j++) {
- ll& u = a[j], &v = a[j + s];
- tie(u, v) = inv ? pair(u - v, v) : pair(u + v, v); // AND
- //tie(u, v) = inv ? pair(u, v - u) : pair(u, v + u); //OR
+ ll &u = a[j], &v = a[j + s];
+ u = inv ? u - v : u + v; // AND
+ //v = inv ? v - u : v + u; // OR
//tie(u, v) = pair(u + v, u - v); // XOR
}}}
//if (inv) for (ll& x : a) x /= n; // XOR (careful with MOD)
diff --git a/content/math/transforms/orTransform.cpp b/content/math/transforms/orTransform.cpp
index 6503a68..1833ac5 100644
--- a/content/math/transforms/orTransform.cpp
+++ b/content/math/transforms/orTransform.cpp
@@ -3,6 +3,6 @@ void fft(vector<ll>& a, bool inv = false) {
for (int s = 1; s < n; s *= 2) {
for (int i = 0; i < n; i += 2 * s) {
for (int j = i; j < i + s; j++) {
- ll& u = a[j], &v = a[j + s];
- tie(u, v) = inv ? pair(u, v - u) : pair(u, v + u);
+ ll &u = a[j], &v = a[j + s];
+ v = inv ? v - u : v + u;
}}}}
diff --git a/content/math/transforms/xorTransform.cpp b/content/math/transforms/xorTransform.cpp
index 075aac3..aa3db8d 100644
--- a/content/math/transforms/xorTransform.cpp
+++ b/content/math/transforms/xorTransform.cpp
@@ -3,7 +3,7 @@ void fft(vector<ll>& a, bool inv = false) {
for (int s = 1; s < n; s *= 2) {
for (int i = 0; i < n; i += 2 * s) {
for (int j = i; j < i + s; j++) {
- ll& u = a[j], &v = a[j + s];
+ ll &u = a[j], &v = a[j + s];
tie(u, v) = pair(u + v, u - v);
}}}
if (inv) for (ll& x : a) x /= n;