Skip to content

Commit 8e89263

Browse files
committed
Use bazel as a build tool
1 parent f164132 commit 8e89263

File tree

273 files changed

+953
-681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+953
-681
lines changed

.devcontainer/.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "cp-algorithm",
3-
"context": "..",
4-
"dockerFile": "Dockerfile",
3+
"image": "xirc/cp-algorithm",
54
"runArgs": [
65
"--cap-add=SYS_PTRACE",
76
"--security-opt",
@@ -11,7 +10,8 @@
1110
"terminal.integrated.shell.linux": "/bin/bash"
1211
},
1312
"extensions": [
14-
"ms-vscode.cpptools"
13+
"ms-vscode.cpptools",
14+
"bazelbuild.vscode-bazel"
1515
],
1616
"postCreateCommand": "g++ -v",
1717
}

lib/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### https://github.com/bazelbuild/bazel/blob/master/.gitignore
2+
3+
# Ignore backup files.
4+
*~
5+
# Ignore Vim swap files.
6+
.*.swp
7+
# Ignore files generated by IDEs.
8+
/.classpath
9+
/.factorypath
10+
/.idea/
11+
/.ijwb/
12+
/.project
13+
/.settings
14+
/.vscode/
15+
/bazel.iml
16+
# Ignore all bazel-* symlinks. There is no full list since this can change
17+
# based on the name of the directory bazel is cloned into.
18+
/bazel-*
19+
# Ignore outputs generated during Bazel bootstrapping.
20+
/output/
21+
# Ignore jekyll build output.
22+
/production
23+
/.sass-cache
24+
# Bazelisk version file
25+
.bazelversion
26+
# User-specific .bazelrc
27+
user.bazelrc

lib/BUILD

Whitespace-only changes.

lib/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/WORKSPACE

Whitespace-only changes.

lib/algebra_binary-exponentiation/Makefile

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/algebra_binomial-coefficient/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/algebra_extended-euclidean/Makefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/algebra_gcdlcm/Makefile

Lines changed: 0 additions & 12 deletions
This file was deleted.

lib/algebra_prime-factorization/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

lib/bigint/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/cpalgo/BUILD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
load("//:variables.bzl", "COPTS")
3+
4+
5+
cc_library(
6+
name = "main",
7+
hdrs = glob([ "**/*.hpp" ]),
8+
include_prefix = "cpalgo",
9+
copts = COPTS,
10+
visibility = [ "//visibility:public" ],
11+
)
File renamed without changes.

lib/algebra_extended-euclidean/extgcd-iterative.hpp renamed to lib/cpalgo/algebra/extgcd-iterative.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma
1+
#pragma once
22

33
#include <bits/stdc++.h>
44

lib/algebra_extended-euclidean/extgcd-recursive.hpp renamed to lib/cpalgo/algebra/extgcd-recursive.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma
1+
#pragma once
22

33
#include <bits/stdc++.h>
44

File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/data-structure_queue/minimum-queue.hpp renamed to lib/cpalgo/ds/minimum-queue.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <stack>
77
#include <algorithm>
8-
#include "../data-structure_stack/minimum-stack.hpp"
8+
#include "minimum-stack.hpp"
99

1010
// MinimumQueue
1111
// Memory: O(N)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/graph_minimum-cost-arborescence/minimum-cost-arborescence.hpp renamed to lib/cpalgo/graph/minimum-cost-arborescence.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
#include <vector>
77
#include <limits>
8-
#include "../data-structure_union-find-tree/union-find-tree.hpp"
9-
#include "../data-structure_heap/randomized-heap.hpp"
8+
#include "cpalgo/ds/union-find-tree.hpp"
9+
#include "cpalgo/ds/randomized-heap.hpp"
1010

1111
// Minimum Cost Arborescence
1212
// Memory: O(V + E)

lib/graph_minimum-spanning-tree/kruskal_dsu.hpp renamed to lib/cpalgo/graph/minimum-spanning-tree/kruskal-dsu.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <vector>
77
#include <set>
88
#include <algorithm>
9-
#include "../data-structure_union-find-tree/union-find-tree.hpp"
9+
#include "cpalgo/ds/union-find-tree.hpp"
1010

1111
// Minimum Spanning Tree
1212
// Kruskal's Algorithm
File renamed without changes.
File renamed without changes.

lib/graph-tree_lowest-common-ancestor/lca-tarjan.hpp renamed to lib/cpalgo/tree/lowest-common-ancestor/lca-tarjan.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_5_C
55

66
#include <vector>
7-
#include "../data-structure_union-find-tree/union-find-tree.hpp"
7+
#include "cpalgo/ds/union-find-tree.hpp"
88

99
// LCA: Lowest Common Ancestor
1010
// Memory: O(V + E + Q)
File renamed without changes.

lib/data-structure_binary-indexed-tree/Makefile

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/data-structure_cartesian-tree/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_disjoint-sparse-table/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_heap/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_implicit-treap/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_kdtree/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_queue/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_segment-tree/Makefile

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/data-structure_sparse-table/Makefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/data-structure_sqrt-decomposition/Makefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/data-structure_stack/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_treap/Makefile

Lines changed: 0 additions & 9 deletions
This file was deleted.

lib/data-structure_union-find-tree/Makefile

Lines changed: 0 additions & 12 deletions
This file was deleted.

lib/geometry/Makefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)