Reducing integer multiplication into bitwise operations is a well known approach in order to accelerate things like matrix multiplication, see xy for instance.
One of the examples in xy is the following: Given a matrix
import numpy as np | |
from numpy.typing import NDArray | |
def calculate_control_deviation( | |
control: int, | |
start_index: int, | |
end_index: int, | |
alpha: NDArray[np.float64], | |
beta: NDArray[np.int32], |
Reducing integer multiplication into bitwise operations is a well known approach in order to accelerate things like matrix multiplication, see xy for instance.
One of the examples in xy is the following: Given a matrix
from gurobipy import Model, GRB, quicksum as qsum | |
from scipy.optimize import linear_sum_assignment | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import time | |
def build_LP(c): | |
mdl = Model() | |
# parameters |
Following situation: We have scanned a two-sided document by first scanning all the front
pages and then scanning all the pages on the other side. Now we have two PDFs
front.pdf
and back.pdf
that we would like to merge.
Let's say our document consists of a total of 10 pages. Then we have:
front.pdf: p1 p3 p5 p7 p9
back.pdf : p2 p4 p6 p8
\documentclass[tikz]{standalone} | |
\pdfpkresolution=72 | |
\begin{document} | |
\begin{tikzpicture} | |
% 1 px = 1bp | |
\draw[black!20, very thin, step=44px] (0,0) grid (1404bp, 1872bp); | |
\end{tikzpicture} | |
\end{document} |
vorname | nachname | verein | position | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 | S10 | S11 | S12 | S13 | S14 | S15 | S16 | S17 | S18 | S19 | S20 | S21 | S22 | S23 | S24 | S25 | S26 | S27 | S28 | S29 | S30 | S31 | S32 | S33 | S34 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Niklas | Süle | FC Bayern | DEFENDER | 91.0 | 91.0 | 139.0 | 49.0 | 147.0 | 149.0 | |||||||||||||||||||||||||||||
Manuel | Neuer | FC Bayern | GOAL_KEEPER | 67.0 | 73.0 | 140.0 | 103.0 | 153.0 | 115.0 | |||||||||||||||||||||||||||||
Eric Maxim | Choupo-Moting | FC Bayern | FORWARD | 4.0 | 31.0 | 30.0 | 120.0 | 121.0 | ||||||||||||||||||||||||||||||
Sven | Ulreich | FC Bayern | GOAL_KEEPER | 0.0 | 0.0 | |||||||||||||||||||||||||||||||||
Thomas | Müller | FC Bayern | MIDFIELDER | 38.0 | 136.0 | 283.0 | 52.0 | 233.0 | 186.0 | |||||||||||||||||||||||||||||
Robert | Lewandowski | FC Bayern | FORWARD | 157.0 | 227.0 | 420.0 | 162.0 | 191.0 | 97.0 | |||||||||||||||||||||||||||||
Leon | Goretzka | FC Bayern | MIDFIELDER | 97.0 | 88.0 | 167.0 | 101.0 | 296.0 | 120.0 | |||||||||||||||||||||||||||||
Leroy | Sané | FC Bayern | MIDFIELDER | 85.0 | 51.0 | 103.0 | 211.0 | 306.0 | 96.0 | |||||||||||||||||||||||||||||
Joshua | Kimmich | FC Bayern | MIDFIELDER | 200.0 | 135.0 | 184.0 | 177.0 | 401.0 | 251.0 |
TVP HD;CANAL+:10719:vC34M5O20S1:S13E:27500:167=27:109=pol@4;110,111:0:100,1813,1884,B01,500,1803,1861,186C,6ED,1870:4408:318:11000:0 | |
TVP INFO HD;CANAL+:10719:vC34M5O20S1:S13E:27500:168=27:112=pol@4:0:0:4409:318:11000:0 | |
Active Family;CANAL+:10719:vC34M5O20S1:S13E:27500:171=27:0;124:0:100,1813,1884,B01,500:4412:318:11000:0 | |
CANAL+ 4K ULTRA HD;CANAL+:10719:vC34M5O20S1:S13E:27500:172=36:0;128,129,130:0;713:1884:4413:318:11000:0 | |
Eleven Sports 1 4K;CANAL+:10719:vC34M5O20S1:S13E:27500:174=36:136=pol@4:0:1884:4415:318:11000:0 | |
CANAL+ 4K ULTRA HD;CANAL+:10719:vC34M5O20S1:S13E:27500:172=36:0;128,129,130:0;713:1884:4463:318:11000:0 | |
CANAL+ 4K ULTRA HD;CANAL+:10719:vC34M5O20S1:S13E:27500:172=36:0;128,129,130:0;713:1884:4464:318:11000:0 | |
CANAL+ 4K ULTRA HD;CANAL+:10719:vC34M5O20S1:S13E:27500:172=36:0;128,129,130:0;713:1884:4465:318:11000:0 | |
CANAL+ 4K ULTRA HD;CANAL+:10719:vC34M5O20S1:S13E:27500:172=36:0;128,129,130:0;713:1884:4473:318:11000:0 | |
CANAL+ 4K ULTRA HD;CANAL+:10719:vC34M5O20S1:S13E:27500:172=36:0;128,129,130:0;713:188 |