Commit 434f21d2 authored by Dr. Martin Goik's avatar Dr. Martin Goik

Better equation readability

parent b75bb786
......@@ -13,6 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mathjax.home><![CDATA['<script type="text/javascript" src="https://freedocs.mi.hdm-stuttgart.de/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>']]></mathjax.home>
</properties>
<repositories>
......@@ -36,12 +37,6 @@
<version>2.11.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.1.4.RELEASE</version>
</dependency>
<dependency>
<groupId>de.hdm_stuttgart.mi.exam</groupId>
<artifactId>unitmarking</artifactId>
......@@ -68,6 +63,10 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<additionalOptions>
<additionalOption>-html5 --allow-script-in-comments -header ${mathjax.home}</additionalOption>
</additionalOptions>
<javaApiLinks>
<property>
<name>api_11</name>
......@@ -76,10 +75,6 @@
</javaApiLinks>
<stylesheetfile>localstyles.css</stylesheetfile>
<additionalJOptions>
<additionalJOption>-html5</additionalJOption>
</additionalJOptions>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
</plugin>
......
......@@ -25,19 +25,23 @@ public class _2_MathHelper {
/* Tip: Der »%« Operator ist Ihr Freund! */
return 12345; // TODO: Implementiere mich!
}
/**
* <p>Die harmonische Reihe H(n) zu einer natürlichen Zahl 0 &lt; n ist definiert als:</p>
* <p>Die harmonische Reihe \(h(n)\) zu einer natürlichen Zahl \(0 &lt; n\) ist definiert als:</p>
*
* <p>H(n) = 1/1 + 1/2 + 1/3 + ... + 1/n</p>
* <p>\[h(\color{red}{n}) = {1\over 1} + {1\over 2} + {1\over 3} + \dots + {1\over \color{red}{n}}\]</p>
*
* <p>Also beispielsweise:</p>
* <ul>
* <li>H(2) = 1 + 1/2 = 1 + 0.5 = 1.5</li>
* <li>H(3) = 1 + 1./2 + 1./3 = 11./6 = 1.8333333...</li>
* </ul>
*
* \[\begin{array}{l}
* h(\color{red}{2}) = {1\over 1} + {1\over \color{red}{2}} \\
*
* h(\color{red}{5}) = {1\over 1} + {1\over 2} + {1\over 3} + {1\over 4} + {1\over \color{red}{5}}
* \end{array}
* \]
*
* @param n Anzahl der Terme der harmonischen Reihe, mindestens 1.
* @return Der Wert H(n).
* @return Der Wert \(h(n)\).
*/
static public double harmonisch(final int n) {
/* Tip: Beachten Sie mögliche Probleme bei der Division zweier int Werte. */
......
......@@ -13,6 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mathjax.home><![CDATA['<script type="text/javascript" src="https://freedocs.mi.hdm-stuttgart.de/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>']]></mathjax.home>
</properties>
<repositories>
......@@ -36,12 +37,6 @@
<version>2.11.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.1.4.RELEASE</version>
</dependency>
<dependency>
<groupId>de.hdm_stuttgart.mi.exam</groupId>
<artifactId>unitmarking</artifactId>
......@@ -68,6 +63,9 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<additionalOptions>
<additionalOption>-html5 --allow-script-in-comments -header ${mathjax.home}</additionalOption>
</additionalOptions>
<javaApiLinks>
<property>
<name>api_11</name>
......@@ -77,9 +75,6 @@
<stylesheetfile>localstyles.css</stylesheetfile>
<additionalJOptions>
<additionalJOption>-html5</additionalJOption>
</additionalJOptions>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
</plugin>
......
......@@ -36,18 +36,21 @@ public class _2_MathHelper {
return wertFallsUngerade(a) + wertFallsUngerade(b);
}
/**
* <p>Die harmonische Reihe H(n) zu einer natürlichen Zahl 0 &lt; n ist definiert als:</p>
* <p>Die harmonische Reihe \(h(n)\) zu einer natürlichen Zahl \(0 &lt; n\) ist definiert als:</p>
*
* <p>H(n) = 1/1 + 1/2 + 1/3 + ... + 1/n</p>
* <p>\[h(\color{red}{n}) = {1\over 1} + {1\over 2} + {1\over 3} + \dots + {1\over \color{red}{n}}\]</p>
*
* <p>Also beispielsweise:</p>
* <ul>
* <li>H(2) = 1 + 1/2 = 1 + 0.5 = 1.5</li>
* <li>H(3) = 1 + 1/2 + 1/3 = 11/6 = 1.8333333...</li>
* </ul>
*
* \[\begin{array}{l}
* h(\color{red}{2}) = {1\over 1} + {1\over \color{red}{2}} \\
*
* h(\color{red}{5}) = {1\over 1} + {1\over 2} + {1\over 3} + {1\over 4} + {1\over \color{red}{5}}
* \end{array}
* \]
*
* @param n Anzahl der Terme der harmonischen Reihe, mindestens 1.
* @return Der Wert H(n).
* @return Der Wert \(h(n)\).
*/
static public double harmonisch(final int n) {
double summe = 0;
......
......@@ -67,7 +67,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<configuration>
<additionalOptions>
<additionalOption>-html5 --allow-script-in-comments -header ${mathjax.home}</additionalOption>
......
......@@ -67,7 +67,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<configuration>
<additionalOptions>
<additionalOption>-html5 --allow-script-in-comments -header ${mathjax.home}</additionalOption>
......
......@@ -13,6 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mathjax.home><![CDATA['<script type="text/javascript" src="https://freedocs.mi.hdm-stuttgart.de/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>']]></mathjax.home>
</properties>
<repositories>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment