Compare commits

...
17 Commits
5 changed files with 76 additions and 2 deletions

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
# Terminology
## Cluster Terms
| Phrase | Definition |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| agent | A process running in server or client mode. |
| client/node | A Nomad client is responsible for running tasks assigned to it. A client registers itself with servers and watches for work to be assigned. When running the agent, the client may be referred to as a *node*. |
| server | A Nomad server manages all jobs and clients, monitors tasks, and controls which tasks get placed on which nodes. |
| dev_agent | The development agent is an agent configuration that provides useful defaults for running a single node cluster of nomad. |
## Work terms
| Phrase | Definition |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| task | The smallest unit of work in Nomad. Tasks are executed by task drivers like `docker` or `exec`, which allows Nomad to be flexible in the types of tasks it supports. Tasks specify their required task driver, configuration for the driver, constraints, and resources required. |
| group | A series of tasks that run on the same Nomad client. |
| job | The core unit of *control* for Nomad and defines the application and its configuration. It can contain one or many tasks |
| job_specification/jobspec | A job specification, also known as a jobspec. |
| allocation | An allocation is a mapping between a task group in a job and a client node. When a job is run, Nomad will chose a client capable of running it and allocates resources on the machine for the ask(s) in the task group defined for the job. |
+54 -2
View File
@@ -1,3 +1,5 @@
# Sine/Cosine
![A graph of sine and cosine](./assets/graphsincos.png)
Given the above graph:
@@ -13,8 +15,6 @@ Given the above graph:
| $y = cos(2x)$ | Horizontal shrink by a factor of 2 |
# Periodic Functions
A function is considered periodic if it repeats itself at even intervals, where each interval is a complete cycle, referred to as a *period*.
# Sinusoidal Functions
A function that has the same shape as a sine or cosine wave is known as a sinusoidal function.
@@ -33,3 +33,55 @@ How to find the:
$$ y = A * \sin(B(x-\frac{C}{B})) $$
# Tangent
$$ y = tan(x) $$
![Graph of tangent](assets/graphtan.png)
To find relative points to create the above graph, you can use the unit circle:
If $tan(x) = \frac{sin(x)}{cos(x})$, then:
| $sin(0) = 0$ | $cos(0) = 1$ | $tan(0) = \frac{cos(0)}{sin(0)} = \frac{0}{1} =0$ |
| ----------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------- |
| $sin(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}$ | $cos(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}$ | $tan(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}/\frac{\sqrt{2}}{2} = 1$ |
| $sin(\frac{\pi}{2}) = 1$ | $cos(\frac{\pi}{2}) = 0$ | $tan(\frac{\pi}{2}) = \frac{1}{0} = DNF$ |
Interpreting the above table:
- When $x = 0$, $y = 0$
- When $x = \frac{\pi}{4}$, $y = 1$
- When $x = \frac{\pi}{2}$, there's an asymptote
Without any transformations applied, the period of $tan(x) = \pi$. Because $tan$ is an odd function, $tan(-x) = -tan(x)$.
# Cotangent
$$ y = cot(x) $$
![Graph of cotangent](assets/graphcot.svg)
To find relative points to create the above graph, you can use the unit circle:
If $cot(x) = \frac{cos(x)}{sin(x)}$, then:
| $sin(0) = 0$ | $cos(0) = 1$ | $cot(0) = \frac{sin(0)}{cos(0)} = \frac{1}{0} = DNF$ |
| ----------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------- |
| $sin(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}$ | $cos(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}$ | $cot(\frac{\pi}{4}) = \frac{\sqrt{2}}{2}/\frac{\sqrt{2}}{2} = 1$ |
| $sin(\frac{\pi}{2}) = 1$ | $cos(\frac{\pi}{2}) = 0$ | $tan(\frac{\pi}{2}) = \frac{1}{0} = DNF$ |
Without any transformations applied, the period of $cot(x) = \pi$. Because $cot$ is an odd function, $cot(-x) = -cot(x)$.
# Features of Tangent and Cotangent
Given the form $y = A\tan(Bx - C) + D$ (the same applies for $\cot$)
- The stretching factor is $|A|$
- The period is $\frac{\pi}{|B|}$
- The domain of $tan$ is all of $x$, where $x \ne \frac{C}{B} + \frac{\pi}{2} + {\pi}{|B|}k$, where $k$ is an integer. (everywhere but the asymptotes)
- The domain of $cot$ is all of $x$, where $x \ne \frac{C}{B} + \frac{\pi}{|B|}k$, where $k$ is an integer (everywhere but the asymptotes)
- The range of both is $(-\infty, \infty)$
- The phase shift is $\frac{C}{B}$
- The vertical shift is $D$
# Examples
> Given $-2\tan(\pi*x + \pi) - 1$
$A = -2$, $B = \pi$, $C = -\pi$, $D = -1$
| Transformation | Equation |
| -------------- | ------------------------- |
| Stretch | $\|-2\| = 2$ |
| Period | $\frac{\pi}{\|\pi\|} = 1$ |
| Phase shift | $\frac{-\pi}{\pi} = -1$ |
| Vertical shift | $-1$ |
@@ -0,0 +1 @@
<svg id="svgphp-graphs-tangent-cotangent-secant-cosecant-4-s1" width="310" height="300" preserveAspectRatio="xMinYMin meet" viewBox="0 0 310 300" xmlns="http://www.w3.org/2000/svg"><style>text.intmath,text.intmathItalic{stroke:none;fill:#000;font-weight:400}@font-face{font-family:MathJax_Math-italic;src:url(/includes/cssjs/katex/fonts/MathJax_Math-Italic.woff2) format('woff2'),url(/includes/cssjs/katex/fonts/MathJax_Math-Italic.woff) format('woff')}@font-face{font-family:MathJax_Main;src:url(/includes/cssjs/katex/fonts/MathJax_Main-Regular.woff2) format('woff2'),url(/includes/cssjs/katex/fonts/MathJax_Main-Regular.woff) format('woff')}path.grids{shape-rendering:crispEdges}text.intmath{font-size:14.4px;font-family:MathJax_Main,'Times New Roman',Times,serif}text.intmathItalic{font-size:16px;font-style:normal;font-family:MathJax_Math-italic,'Times New Roman',Times,serif}</style><rect id="brdBG-svgphp-graphs-tangent-cotangent-secant-cosecant-4-s1" stroke="none" fill="#fff" x="0" y="0" width="310" height="300" ></rect><path id="axes-svgphp-graphs-tangent-cotangent-secant-cosecant-4-s1" stroke="#444" stroke-width="1" shape-rendering="crispEdges" d = " M72,0 72,300M0,150 310,150 M124,153 124,147 M176,153 176,147 M228,153 228,147 M280,153 280,147 M72,153 72,147 M20,153 20,147 M75,124 69,124 M75,98 69,98 M75,72 69,72 M75,46 69,46 M75,20 69,20 M75,176 69,176 M75,202 69,202 M75,228 69,228 M75,254 69,254 M75,280 69,280"></path><rect fill="#fff" x="115.03" y="154" width="18" height="16" ></rect><text x="124" y="168" class="intmath" text-anchor="middle">0.5&#x3c0;</text><rect fill="#fff" x="167.04" y="154" width="18" height="16" ></rect><text x="176" y="168" class="intmath" text-anchor="middle">&#x3c0;</text><rect fill="#fff" x="219.05" y="154" width="18" height="16" ></rect><text x="228" y="168" class="intmath" text-anchor="middle">1.5&#x3c0;</text><rect fill="#fff" x="271.07" y="154" width="18" height="16" ></rect><text x="280" y="168" class="intmath" text-anchor="middle">2&#x3c0;</text><rect fill="#fff" x="10" y="154" width="20" height="16" ></rect><text x="20" y="168" class="intmath" text-anchor="middle">-0.5&#x3c0;</text><rect fill="#fff" x="57.01" y="116" width="10" height="16" ></rect><text x="64" y="129" class="intmath" text-anchor="end">2</text><rect fill="#fff" x="57.01" y="90" width="10" height="16" ></rect><text x="64" y="103" class="intmath" text-anchor="end">4</text><rect fill="#fff" x="57.01" y="64" width="10" height="16" ></rect><text x="64" y="77" class="intmath" text-anchor="end">6</text><rect fill="#fff" x="57.01" y="38" width="10" height="16" ></rect><text x="64" y="51" class="intmath" text-anchor="end">8</text><rect fill="#fff" x="47.01" y="12" width="20" height="16" ></rect><text x="64" y="25" class="intmath" text-anchor="end">10</text><rect fill="#fff" x="47.01" y="168" width="20" height="16" ></rect><text x="64" y="181" class="intmath" text-anchor="end">-2</text><rect fill="#fff" x="47.01" y="194" width="20" height="16" ></rect><text x="64" y="207" class="intmath" text-anchor="end">-4</text><rect fill="#fff" x="47.01" y="220" width="20" height="16" ></rect><text x="64" y="233" class="intmath" text-anchor="end">-6</text><rect fill="#fff" x="47.01" y="246" width="20" height="16" ></rect><text x="64" y="259" class="intmath" text-anchor="end">-8</text><rect fill="#fff" x="37.01" y="272" width="30" height="16" ></rect><text x="64" y="285" class="intmath" text-anchor="end">-10</text><text x="308" y="141" class="intmathItalic" text-anchor="end">x</text><text x="81" y="13" class="intmathItalic" text-anchor="start">y</text><path stroke="#555" stroke-width="1" fill="#555" transform = "rotate(90 310 150)" d = "M 310 150 L 306 164 L 310 162 L 314 164 Z"></path><path stroke="#555" stroke-width="1" fill="#555" transform = "rotate(0 72 0)" d = "M 72 0 L 68 14 L 72 12 L 76 14 Z"></path><path stroke="#165a71" stroke-width="1.5" fill="none" d = "M0,141 1.2,141.7 2.5,142.4 3.7,143 4.9,143.6 6.2,144.2 7.4,144.8 8.7,145.4 9.9,145.9 11.1,146.4 12.4,146.9 13.6,147.5 14.8,148 16.1,148.4 17.3,148.9 18.5,149.4 19.8,149.9 21,150.4 22.2,150.9 23.5,151.4 24.7,151.9 26,152.4 27.2,152.9 28.4,153.4 29.7,153.9 30.9,154.4 32.1,155 33.4,155.6 34.6,156.1 35.8,156.7 37.1,157.4 38.3,158 39.5,158.7 40.8,159.4 42,160.2 43.3,161 44.5,161.9 45.7,162.8 47,163.8 48.2,164.8 49.4,166 50.7,167.3 51.9,168.7 53.1,170.3 54.4,172.1 55.6,174.1 56.9,176.4 58.1,179.1 59.3,182.2 60.6,186.1 61.8,190.8 63,196.7 64.3,204.6 65.5,215.3 66.7,230.9 68,256.1 69.2,303.3 "></path><path stroke="#165a71" stroke-width="1.5" fill="none" d = "M75.4,23 76.6,57.3 77.9,77.2 79.1,90.2 80.3,99.4 81.6,106.2 82.8,111.5 84,115.8 85.3,119.3 86.5,122.2 87.8,124.7 89,126.9 90.2,128.8 91.5,130.5 92.7,132 93.9,133.3 95.2,134.5 96.4,135.7 97.6,136.7 98.9,137.7 100.1,138.5 101.3,139.4 102.6,140.2 103.8,140.9 105.1,141.6 106.3,142.3 107.5,142.9 108.8,143.5 110,144.1 111.2,144.7 112.5,145.3 113.7,145.8 114.9,146.3 116.2,146.9 117.4,147.4 118.6,147.9 119.9,148.4 121.1,148.9 122.4,14Line truncated

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

@@ -32,6 +32,9 @@ C99 adds a `long long` int
## Floats
A float is a decimal value. Slower arithmetic and inexact values are both drawbacks of using floats.
## Characters
In C, a `char` denotes a single byte of arbitrary encoding.
## Variables
A variable must be declared before it is assigned.