Skip to content

Commit b3d750a

Browse files
author
Oleksandr Kulkov
committed
Add tags support, set tags for algebra articles
1 parent d69bde9 commit b3d750a

31 files changed

+170
-1
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
- name: Build pages
3737
env:
3838
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.PAT_API_KEY }}
39+
MKDOCS_ENABLE_GIT_REVISION_DATE: True
3940
run: |
4041
mkdocs build --strict
4142
- uses: FirebaseExtended/action-hosting-deploy@v0

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- name: Build pages
3535
env:
3636
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.PAT_API_KEY }}
37+
MKDOCS_ENABLE_GIT_REVISION_DATE: True
3738
run: |
3839
mkdocs build --strict
3940
- name: Run algorithm code tests

mkdocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,25 @@ markdown_extensions:
4646
- pymdownx.emoji:
4747
emoji_index: !!python/name:materialx.emoji.twemoji
4848
emoji_generator: !!python/name:materialx.emoji.to_svg
49+
- meta
4950

5051
plugins:
5152
- mkdocs-simple-hooks:
5253
hooks:
5354
on_env: "hooks:on_env"
5455
- search
56+
- tags:
57+
tags_file: tags.md
5558
- literate-nav:
5659
nav_file: navigation.md
5760
- git-revision-date-localized:
5861
enable_creation_date: true
62+
enabled: !ENV [MKDOCS_ENABLE_GIT_REVISION_DATE, False]
5963
- git-authors
6064
- git-committers:
6165
repository: e-maxx-eng/e-maxx-eng
6266
docs_path: src/
63-
token: !!python/object/apply:os.getenv ["MKDOCS_GIT_COMMITTERS_APIKEY"]
67+
token: !ENV MKDOCS_GIT_COMMITTERS_APIKEY
6468
- macros
6569

6670
extra:

src/algebra/all-submasks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Submask Enumeration
28

39
## Enumerating all submasks of a given mask

src/algebra/balanced-ternary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Balanced Ternary
28

39
!["Setun computer using Balanced Ternary system"](http://ternary.3neko.ru/photo/setun1_small.jpg)

src/algebra/big-integer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Arbitrary-Precision Arithmetic
28

39
Arbitrary-Precision arithmetic, also known as "bignum" or simply "long arithmetic" is a set of data structures and algorithms which allows to process much greater numbers than can be fit in standard data types. Here are several types of arbitrary-precision arithmetic.

src/algebra/binary-exp.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Binary Exponentiation
28

39
Binary exponentiation (also known as exponentiation by squaring) is a trick which allows to calculate $a^n$ using only $O(\log n)$ multiplications (instead of $O(n)$ multiplications required by the naive approach).

src/algebra/chinese-remainder-theorem.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Chinese Remainder Theorem
28

39
The Chinese Remainder Theorem (which will be referred to as CRT in the rest of this article) was discovered by Chinese mathematician Sun Zi.

src/algebra/continued-fractions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Original
4+
- "Author: adamant"
5+
---
6+
17
<!--?title Continued fractions -->
28
# Continued fractions
39

src/algebra/discrete-log.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Discrete Logarithm
28

39
The discrete logarithm is an integer $x$ satisfying the equation

src/algebra/discrete-root.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Discrete Root
28

39
The problem of finding a discrete root is defined as follows. Given a prime $n$ and two integers $a$ and $k$, find all $x$ for which:

src/algebra/divisors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Original
4+
- "Author: jakobkogler"
5+
---
6+
17
# Number of divisors / sum of divisors
28

39
In this article we discuss how to compute the number of divisors $d(n)$ and the sum of divisors $\sigma(n)$ of a given number $n$.

src/algebra/euclid-algorithm.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Euclidean algorithm for computing the greatest common divisor
28

39
Given two non-negative integers $a$ and $b$, we have to find their **GCD** (greatest common divisor), i.e. the largest number which is a divisor of both $a$ and $b$.

src/algebra/extended-euclid-algorithm.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Extended Euclidean Algorithm
28

39
While the [Euclidean algorithm](euclid-algorithm.md) calculates only the greatest common divisor (GCD) of two integers $a$ and $b$, the extended version also finds a way to represent GCD in terms of $a$ and $b$, i.e. coefficients $x$ and $y$ for which:

src/algebra/factorial-divisors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Finding Power of Factorial Divisor
28

39
You are given two numbers $n$ and $k$. Find the largest power of $k$ $x$ such that $n!$ is divisible by $k^x$.

src/algebra/factorial-modulo.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<!-- Original link: modular_factorial -->
2+
---
3+
tags:
4+
- Translated
5+
- "From: e-maxx.ru"
6+
---
7+
18
---
29
title: Factorial modulo p
310
---

src/algebra/factoring-exp.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
tags:
3+
- Original
4+
- "Author: hselasky"
5+
- "Contributor: adamant"
6+
---
7+
18
# Binary Exponentiation by Factoring
29

310
Consider a problem of computing $ax^y \pmod{2^d}$, given integers $a$, $x$, $y$ and $d \geq 3$, where $x$ is odd.

src/algebra/factorization.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Integer factorization
28

39
In this article we list several algorithms for factorizing integers, each of them can be both fast and also slow (some slower than others) depending on their input.

src/algebra/fft.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Fast Fourier transform
28

39
In this article we will discuss an algorithm that allows us to multiply two polynomials of length $n$ in $O(n \log n)$ time, which is better than the trivial multiplication which takes $O(n^2)$ time.

src/algebra/fibonacci-numbers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Fibonacci Numbers
28

39
The Fibonacci sequence is defined as follows:

src/algebra/gray-code.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Gray code
28

39
Gray code is a binary numeral system where two successive values differ in only one bit.

src/algebra/linear-diophantine-equation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Linear Diophantine Equation
28

39
A Linear Diophantine Equation (in two variables) is an equation of the general form:

src/algebra/module-inverse.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Modular Multiplicative Inverse
28

39
## Definition

src/algebra/phi-function.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Euler's totient function
28

39
Euler's totient function, also known as **phi-function** $\phi (n)$, counts the number of integers between 1 and $n$ inclusive, which are coprime to $n$. Two numbers are coprime if their greatest common divisor equals $1$ ($1$ is considered to be coprime to any number).

src/algebra/polynomial.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "Author: adamant"
5+
---
6+
17
# Operations on polynomials and series
28

39
In this article we will cover common operations that you will probably have to do if you deal with polynomials.

src/algebra/prime-sieve-linear.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Linear Sieve
28

39
Given a number $n$, find all prime numbers in a segment $[2;n]$.

src/algebra/primitive-root.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Primitive Root
28

39
## Definition

src/algebra/sieve-of-eratosthenes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
tags:
3+
- Translated
4+
- "From: e-maxx.ru"
5+
---
6+
17
# Sieve of Eratosthenes
28

39
Sieve of Eratosthenes is an algorithm for finding all the prime numbers in a segment $[1;n]$ using $O(n \log \log n)$ operations.

src/navigation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
- Home
22
- [Main Page](index.md)
33
- [Navigation](navigation.md)
4+
- [Tag index](tags.md)
45
- [How to Contribute](contrib.md)
56
- [Preview](preview.md)
67
- Algebra

src/overrides/partials/content.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
{{ page.meta.git_revision_date_localized }}
5858
</ul>
5959

60+
<!-- Tags -->
61+
{% if "tags" in config.plugins %}
62+
{% include "partials/tags.html" %}
63+
{% endif %}
64+
6065
{% if not "\x3ch1" in page.content %}
6166
<h1>{{ page.title | d(config.site_name, true)}}</h1>
6267
{% endif %}

src/tags.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Tags
2+
3+
This file contains a global index of all tags used on the pages.
4+
5+
[TAGS]

0 commit comments

Comments
 (0)