This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 162 required packages: | |
| - ASTInterpreter 0.0.4 | |
| - AbstractTrees 0.0.4 | |
| - ArgParse 0.5.0 | |
| - Atom 0.5.10 | |
| - AutoGrad 0.0.6 | |
| - AutoHashEquals 0.1.1 | |
| - AxisAlgorithms 0.1.6 | |
| - BinDeps 0.5.0 | |
| - Blink 0.5.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int vectorIntersectionBenchmarkLoopOpt1() | |
| { | |
| const int nBags = 1000; | |
| const int maxBagLength = 10; | |
| vector<vector<int>> bags; | |
| ifstream input("10000ran.dat"); // http://www.agner.org/random/10000ran.zip | |
| int similarity = 0; | |
| bags.reserve(nBags); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int setIntersectionBenchmarkLoopOpt1() | |
| { | |
| const int nBags = 1000; | |
| const int maxBagLength = 10; | |
| vector<set<int>> bags; | |
| ifstream input("10000ran.dat"); // http://www.agner.org/random/10000ran.zip | |
| int similarity = 0; | |
| bags.reserve(nBags); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template <typename InIt1, typename InIt2, typename OutIt> | |
| OutIt unordered_set_intersection(InIt1 b1, InIt1 e1, InIt2 b2, InIt2 e2, OutIt out) { | |
| while (!(b1 == e1)) { | |
| if (!(std::find(b2, e2, *b1) == e2)) { | |
| *out = *b1; | |
| ++out; | |
| } | |
| ++b1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int vectorIntersectionBenchmark() | |
| { | |
| const int nBags = 1000; | |
| const int maxBagLength = 10; | |
| vector<vector<int>> bags; | |
| ifstream input("10000ran.dat"); // http://www.agner.org/random/10000ran.zip | |
| int similarity = 0; | |
| bags.reserve(nBags); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int setIntersectionBenchmark() | |
| { | |
| const int nBags = 1000; | |
| const int maxBagLength = 10; | |
| vector<set<int>> bags; | |
| ifstream input("10000ran.dat"); // http://www.agner.org/random/10000ran.zip | |
| int similarity = 0; | |
| bags.reserve(nBags); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static int setIntersectionBenchmark() throws java.io.IOException { | |
| final int nBags = 1000; | |
| final int maxBagLength = 10; | |
| Scanner scanner = new Scanner(new File("10000ran.dat")); | |
| ArrayList<HashSet<Integer>> bags = new ArrayList<HashSet<Integer>>(nBags); | |
| int similarity = 0; | |
| scanner.useDelimiter(",\\s*"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <QApplication> | |
| #include <QGraphicsScene> | |
| #include <QLabel> | |
| #include <QBrush> | |
| #include <QGraphicsSimpleTextItem> | |
| #include <QColor> | |
| #include <QGraphicsView> | |
| using namespace std; |