From f913c999c321d156aff8d9c7f60836fb58d802a0 Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Sun, 12 Nov 2017 08:58:21 +0100 Subject: [PATCH] Javadoc API ref fixes --- Doc/Sd1/arrays.xml | 35 +++++++++++++------------- Doc/Sd1/collections.xml | 26 ++++++++++---------- Doc/Sd1/deployment.xml | 10 ++++---- Doc/Sd1/objectsClasses.xml | 50 +++++++++++++++++++------------------- 4 files changed, 60 insertions(+), 61 deletions(-) diff --git a/Doc/Sd1/arrays.xml b/Doc/Sd1/arrays.xml index 0c1107489..8f2d6dbf3 100644 --- a/Doc/Sd1/arrays.xml +++ b/Doc/Sd1/arrays.xml @@ -1331,7 +1331,7 @@ public class AppTest { <para>Do not forget to extend your <xref linkend="glo_Junit"/> tests. You may want to import the <link - xlink:href="Ref/api/P/Array/integerStoreStat/eclipse.zip">skeleton + xlink:href="https://gitlab.mi.hdm-stuttgart.de/goik/GoikLectures/tree/master/P/Sd1/Array/integerStoreStat">skeleton project</link> for getting started.</para> <caution> @@ -1569,10 +1569,9 @@ public void testApp() { </listitem> <listitem> - <para>Our <methodname - xlink:href="Ref/api/P/Prime/V1/de/hdm_stuttgart/mi/sd1/main/PrimeNumbers.html#main-java.lang.String:A-">main()</methodname> - method allows to estimate the prime number computing - performance:</para> + <para>Executing <methodname + xlink:href="P/Sd1/Prime/V1/target/site/apidocs/de/hdm_stuttgart/mi/sd1/main/PrimeNumbers.html#main-java.lang.String:A-">main()</methodname> + allows for estimating the prime number computing performance:</para> <screen>Found 664579 prime numbers within 15.136 seconds.</screen> </listitem> @@ -1637,7 +1636,7 @@ public void testApp() { <itemizedlist> <listitem> <para>You may want to reuse your unsorted <classname - xlink:href="Ref/api/P/Array/integerStoreUnbounded/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html">IntegerStore</classname> + xlink:href="P/Sd1/Array/integerStoreUnbounded/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html">IntegerStore</classname> implementation to provide a dynamically growing array of integer values.</para> </listitem> @@ -1754,7 +1753,7 @@ for (final int i: unsortedValues) { <listitem> <para>Modify your<methodname - xlink:href="Ref/api/P/Array/integerStoreStat/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-"> + xlink:href="P/Sd1/Array/integerStoreStat/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-"> addValue(...)</methodname> method's implementation. Though there are more elaborate sorting methods available in Java we'll do it the hard way ourselves in this exercise. Consider @@ -1767,7 +1766,7 @@ store.addValue(9); store.addValue(3);</programlisting> <para>Prior to inserting a new value our <methodname - xlink:href="Ref/api/P/Array/integerStoreStat/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-">addValue(...)</methodname> + xlink:href="P/Sd1/Array/integerStoreStat/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-">addValue(...)</methodname> method shall find a suitable position inside the array of already added values to insert the new value. When adding the last value 3 in the above example the internal array already @@ -1885,14 +1884,14 @@ Your sample's median is: 1.0</screen> <para>The <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#copyOfRange-int:A-int-int-">copyOfRange(...)</link> method in <methodname - xlink:href="Ref/api/P/Array/integerStoreMedianAnswer/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#getValues--">getValues()</methodname> + xlink:href="P/Sd1/Array/integerStoreMedianAnswer/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#getValues--">getValues()</methodname> returns that portion of our <code>int[] values</code> array - which had actually been filled with data.</para> + actually been filled with data.</para> </listitem> <listitem> - <para>Provide some tests to assure your sorting implementation - works well. You'll implement the actual sorting in the next + <para>Provide some tests assuring your sorting implementation + works well prior to actually implementing the actual sorting in the next step. Right now testing for correct sorting will fail (unless a given set of values had already been added in ascending order). A test might look like:</para> @@ -1921,7 +1920,7 @@ for (final int i: unsortedValues) { <listitem> <para>Modify your<methodname - xlink:href="Ref/api/P/Array/integerStoreStat/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-"> + xlink:href="P/Sd1/Array/integerStoreStat/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-"> addValue(...)</methodname> method's implementation. Though there are more elaborate sorting methods available in Java we'll do it the hard way ourselves in this exercise. Consider @@ -1934,7 +1933,7 @@ store.addValue(9); store.addValue(3);</programlisting> <para>Prior to inserting a new value our <methodname - xlink:href="Ref/api/P/Array/integerStoreStat/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-">addValue(...)</methodname> + xlink:href="P/Sd1/Array/integerStoreStat/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-">addValue(...)</methodname> method shall find a suitable position inside the array of already added values to insert the new value. When adding the last value 3 in the above example the internal array already @@ -1985,10 +1984,10 @@ values newArray | 1| 2| F| 7| 9| | ...</screen> <listitem> <para>The constructor <methodname - xlink:href="Ref/api/P/Array/integerStoreMedianAnswer/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#IntegerStore-int:A-">public + xlink:href="P/Sd1/Array/integerStoreMedianAnswer/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#IntegerStore-int:A-">public IntegerStore(final int[] values)</methodname> internally uses our <methodname - xlink:href="Ref/api/P/Array/integerStoreMedianAnswer/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-">addValue(...)</methodname> + xlink:href="P/Sd1/Array/integerStoreMedianAnswer/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#addValue-int-">addValue(...)</methodname> method thus adding each array value one by one. Consider an alternative naive implementation:</para> @@ -2038,13 +2037,13 @@ values newArray | 1| 2| F| 7| 9| | ...</screen> <listitem> <para><methodname - xlink:href="Ref/api/P/Array/integerStoreMedianAnswer/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#getMedian--">double + xlink:href="P/Sd1/Array/integerStoreMedianAnswer/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html#getMedian--">double getMedian()</methodname></para> </listitem> <listitem> <para><methodname - xlink:href="Ref/api/P/Array/integerStoreMedianAnswer/de/hdm_stuttgart/mi/sd1/main/Driver.html#main-java.lang.String:A-">main(...)</methodname></para> + xlink:href="P/Sd1/Array/integerStoreMedianAnswer/target/site/apidocs/de/hdm_stuttgart/mi/sd1/main/Driver.html#main-java.lang.String:A-">main(...)</methodname></para> </listitem> </orderedlist> </answer> diff --git a/Doc/Sd1/collections.xml b/Doc/Sd1/collections.xml index 0f6a12885..1c7c458a5 100644 --- a/Doc/Sd1/collections.xml +++ b/Doc/Sd1/collections.xml @@ -888,7 +888,7 @@ End of records</screen> <glosslist> <glossentry> <glossterm><classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/Address.html">Address</classname></glossterm> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/Address.html">Address</classname></glossterm> <glossdef> <para>Holding components like first name, last name, @@ -899,7 +899,7 @@ End of records</screen> <glossentry> <glossterm><classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/Address2text.html">Address2text</classname></glossterm> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/Address2text.html">Address2text</classname></glossterm> <glossdef> <para>The main application. This class assembles other @@ -910,7 +910,7 @@ End of records</screen> <glossentry> <glossterm><classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/Address2textFormatter.html">Address2textFormatter</classname></glossterm> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/Address2textFormatter.html">Address2textFormatter</classname></glossterm> <glossdef> <para>This class formats individual address @@ -920,7 +920,7 @@ End of records</screen> <glossentry> <glossterm><classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/AddressDataHandler.html">AddressDataHandler</classname></glossterm> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/AddressDataHandler.html">AddressDataHandler</classname></glossterm> <glossdef> <para>Opening the data source and creating a Java in @@ -932,7 +932,7 @@ End of records</screen> <glossentry> <glossterm><classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/AddressFormatter.html">AddressFormatter</classname></glossterm> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/AddressFormatter.html">AddressFormatter</classname></glossterm> <glossdef> <para>This interface specifies three methods being @@ -942,7 +942,7 @@ End of records</screen> <glossentry> <glossterm><classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/AddressParseError.html">AddressParseError</classname></glossterm> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/AddressParseError.html">AddressParseError</classname></glossterm> <glossdef> <para>Instances of this exception will be thrown @@ -961,7 +961,7 @@ End of records</screen> <listitem> <para>The constructor <link - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/Address.html#Address(java.lang.String,%20int)">Address(...)</link> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/Address.html#Address-java.lang.String-int-">Address(...)</link> does not yet parse address records but creates constant dummy data instead. Use the parameter <code>csvRecord</code> to actually initialize the desired address fields @@ -991,7 +991,7 @@ End of records</screen> <listitem> <para>Think of all syntax rules of your input data source addresses.txt and throw <classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/AddressParseError.html">AddressParseError</classname> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/AddressParseError.html">AddressParseError</classname> appropriate exceptions. Write test cases checking for correct parsing error detection in input files.</para> </listitem> @@ -999,15 +999,15 @@ End of records</screen> <listitem> <para>The current project produces text output. In order to generate HTML you have to replace <classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/Address2textFormatter.html">Address2textFormatter</classname> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/Address2textFormatter.html">Address2textFormatter</classname> by a new class <classname>Address2htmlFormatter</classname> which implements the interface <classname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/AddressFormatter.html">AddressFormatter</classname> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/AddressFormatter.html">AddressFormatter</classname> as well.</para> <para>You may then exchange your formatter in <classname>Address2text</classname>.<methodname - xlink:href="Ref/api/P/HtmlFormatting/Simple/Exercise/de/hdm_stuttgart/mi/sd1/htmlformat/Address2text.html#main(java.lang.String[])">main()</methodname>:</para> + xlink:href="P/Sd1/HtmlFormatting/Simple/Exercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/htmlformat/Address2text.html#main-java.lang.String:A-">main()</methodname>:</para> <programlisting language="java">final AddressFormatter htmlFormatter = new Address2htmlFormatter();</programlisting> </listitem> @@ -1363,7 +1363,7 @@ public interface Set_String { <para>Achieving this result relied on implementing a helper class <classname - xlink:href="Ref/api/P/WordFrequency1/Solution/de/hdm_stuttgart/mi/sd1/textstat/WordFrequency.html">WordFrequency</classname> + xlink:href="P/Sd1/WordFrequency1/Solution/target/site/apidocs/de/hdm_stuttgart/mi/sd1/textstat/WordFrequency.html">WordFrequency</classname> grouping words and frequencies:</para> <programlisting language="java">public class WordFrequency { @@ -1444,7 +1444,7 @@ public interface Set_String { <question> <para>Re-implement <xref linkend="sd1CollectionWordFrequencies"/> replacing your <classname - xlink:href="Ref/api/P/WordFrequency1/Solution/de/hdm_stuttgart/mi/sd1/textstat/WordFrequency.html">WordFrequency</classname> + xlink:href="P/Sd1/WordFrequency1/Solution/target/site/apidocs/de/hdm_stuttgart/mi/sd1/textstat/WordFrequency.html">WordFrequency</classname> object by an instance of <classname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html">Map</classname><<classname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html">String</classname>, diff --git a/Doc/Sd1/deployment.xml b/Doc/Sd1/deployment.xml index 50a5aeb16..42825c7e2 100644 --- a/Doc/Sd1/deployment.xml +++ b/Doc/Sd1/deployment.xml @@ -53,7 +53,7 @@ public class ArrayMethodTest { <glosslist> <glossentry> <glossterm><link - xlink:href="Ref/api/P/Array/arraycalcExercise/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#swap(int[],%20int[])">swap</link></glossterm> + xlink:href="P/Sd1/Array/arraycalcExercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#swap-int:A-int:A-">swap</link></glossterm> <glossdef> <para>This effectively requires extending the concept of @@ -73,7 +73,7 @@ public class ArrayMethodTest { <glossentry> <glossterm><link - xlink:href="Ref/api/P/Array/arraycalcExercise/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#isPalindrome(java.lang.String)">isPalindrome</link></glossterm> + xlink:href="P/Sd1/Array/arraycalcExercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#isPalindrome-java.lang.String-">isPalindrome</link></glossterm> <glossdef> <para>Consider a two step implementation:</para> @@ -104,14 +104,14 @@ public class ArrayMethodTest { <glossentry> <glossterm><link - xlink:href="Ref/api/P/Array/arraycalcExercise/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#containsSameElements(int[],%20int[])">containsSameElements</link></glossterm> + xlink:href="P/Sd1/Array/arraycalcExercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#containsSameElements-int:A-int:A-">containsSameElements</link></glossterm> <glossdef> <para>You may copy <code>int[] b</code> array to a <quote>shadow</quote> array and then subsequently erase all elements of <code>int[] a</code> from this copy. The method <link - xlink:href="Ref/api/P/Array/arraycalcExercise/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#findIndex(int[],%20int)">findIndex</link> + xlink:href="P/Sd1/Array/arraycalcExercise/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/Arraymethods.html#findIndex-int:A-int-">findIndex</link> is quite helpful.</para> <para>Consider for example <code>int[] bCopy = {1, 3, 4, 3, @@ -281,7 +281,7 @@ public class InputValidator { <listitem> <para>Use your class <classname - xlink:href="Ref/api/P/Array/integerStoreMedianAnswer/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html">IntegerStore</classname> + xlink:href="P/Sd1/Array/integerStoreMedianAnswer/target/site/apidocs/de/hdm_stuttgart/mi/sd1/store/IntegerStore.html">IntegerStore</classname> from exercise <xref linkend="sd1StoreStatistics"/> to compute the desired output.</para> </listitem> diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 727c450da..8cee272d5 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -3092,7 +3092,7 @@ Is 2016 a leap year? true</screen> <para>A first solution may be:</para> <programlisting language="java"> <link - xlink:href="Ref/api/P/leapYear/de/hdm_stuttgart/de/sd1/leap/LeapYear.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { + xlink:href="P/Sd1/leapYear/target/site/apidocs/de/hdm_stuttgart/de/sd1/leap/LeapYear.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { if (year % 400 == 0) { // Every 400 years we do have a leap year. return true; } else if (year % 4 == 0 && 0 != year % 100) { // Every 4 years we do have a leap @@ -3107,7 +3107,7 @@ Is 2016 a leap year? true</screen> prefer compact code:</para> <programlisting language="java"> <link - xlink:href="Ref/api/PlLeapYear/de/hdm_stuttgart/de/sd1/leap/LeapYearCompact.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { + xlink:href="P/Sd1/leapYear/target/site/apidocs/de/hdm_stuttgart/de/sd1/leap/LeapYearCompact.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { return year % 400 == 0 || // Every 400 years we do have a leap year. year % 4 == 0 && 0 != year % 100; // Every 4 years we do have a leap year @@ -3219,7 +3219,7 @@ Is 2016 a leap year? true</screen> </annotation> <para>We just need a single loop in <link - xlink:href="Ref/api/P/summing/de/hdm_stuttgart/de/sd1/sum/Summing.html#getSum-int-">Summing.getSum(...)</link>.</para> + xlink:href="P/Sd1/summing/target/site/apidocs/de/hdm_stuttgart/de/sd1/sum/Summing.html#getSum-int-">Summing.getSum(...)</link>.</para> </answer> </qandaentry> </qandadiv> @@ -3307,10 +3307,10 @@ Is 2016 a leap year? true</screen> implement:</para> <programlisting language="java">public class <link - xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html">LoopExample</link> { + xlink:href="P/Sd1/loop/answer/target/site/apidocs/de/hdm_stuttgart/de/sd1/loop/LoopExample.html">LoopExample</link> { ... public static void <link - xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">while_squareNumbers(final int limit)</link> { + xlink:href="P/Sd1/loop/answer/target/site/apidocs/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">while_squareNumbers(final int limit)</link> { System.out.println("Computing square numbers"); int i = 4; while (i < limit) { @@ -3343,7 +3343,7 @@ Is 2016 a leap year? true</screen> statement:</para> <programlisting language="java"> public static void <link - xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">doWhile_squareNumbers</link>(final int limit) { + xlink:href="P/Sd1/loop/answer/target/site/apidocs/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">doWhile_squareNumbers</link>(final int limit) { System.out.println("Computing square numbers"); int i = 4; if (i < limit) { // Needed !!! @@ -3479,7 +3479,7 @@ Is 2016 a leap year? true</screen> </annotation> <para>See <link - xlink:href="Ref/api/P/rounding/de/hdm_stuttgart/de/sd1/rounding/MathTable.html">MathTable</link>.</para> + xlink:href="P/Sd1/rounding/target/site/apidocs/de/hdm_stuttgart/de/sd1/rounding/MathTable.html">MathTable</link>.</para> </answer> </qandaentry> </qandadiv> @@ -3690,14 +3690,14 @@ Is 2016 a leap year? true</screen> <para>We need the appropriate getter and setter methods in <classname - xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html">Account</classname>:</para> + xlink:href="P/Sd1/interest/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/interest/Account.html">Account</classname>:</para> <programlisting language="java"> /** * @return * the current default interest rate value. */ public static double <link - xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html#getDefaultInterestRate--">getDefaultInterestRate()</link> { + xlink:href="P/Sd1/interest/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/interest/Account.html#getDefaultInterestRate--">getDefaultInterestRate()</link> { return defaultInterestRate; } @@ -3709,7 +3709,7 @@ Is 2016 a leap year? true</screen> * the desired default interest rate value. */ public static void <link - xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html#setDefaultInterestRate-double-">setDefaultInterestRate(double defaultInterestRate)</link> { + xlink:href="P/Sd1/interest/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/interest/Account.html#setDefaultInterestRate-double-">setDefaultInterestRate(double defaultInterestRate)</link> { Account.defaultInterestRate = defaultInterestRate; }</programlisting> @@ -3824,7 +3824,7 @@ long sum = (long)a + b;</programlisting> </annotation> <para>See implementation at <link - xlink:href="Ref/api/P/fraction/V1/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">Fraction</link>.</para> + xlink:href="P/Sd1/fraction/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">Fraction</link>.</para> </answer> </qandaentry> </qandadiv> @@ -4454,10 +4454,10 @@ Largest long value:9223372036854775807</screen></td> </annotation> <para>Implementing <methodname - xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getGcd(</methodname>...):</para> + xlink:href="P/Sd1/Gcd/V1/target/site/apidocs/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getGcd(</methodname>...):</para> <programlisting language="java"> public static long <link - xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getCommonMultiple-long-long-">getGcd(long a, long b)</link> { + xlink:href="P/Sd1/Gcd/V1/target/site/apidocs/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getCommonMultiple-long-long-">getGcd(long a, long b)</link> { // Following http://www.math.rutgers.edu/~greenfie/gs2004/euclid.html if (a < b) { // Swap the values of a and b @@ -4513,7 +4513,7 @@ Largest long value:9223372036854775807</screen></td> </inlineequation>. Thus we have:</para> <programlisting language="java"> public static long <link - xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getLeastCommonMultiple(long a, long b)</link> { + xlink:href="P/Sd1/Gcd/V1/target/site/apidocs/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getLeastCommonMultiple(long a, long b)</link> { final long gcd = getGcd(a, b); if (1 == gcd) { return a * b; @@ -4629,7 +4629,7 @@ Largest long value:9223372036854775807</screen></td> the <acronym>GCD</acronym> value:</para> <programlisting language="java"> <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#Fraction-long-long-">public Fraction(long numerator, long denominator)</link> { + xlink:href="P/Sd1/fraction/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#Fraction-long-long-">public Fraction(long numerator, long denominator)</link> { final long gcd = Math.getGcd(numerator, denominator); setNumerator(numerator / gcd); @@ -4712,7 +4712,7 @@ Largest long value:9223372036854775807</screen></td> </inlineequation>. We should thus implement:</para> <programlisting language="java"> public Fraction <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#mult-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">mult(Fraction f)</link> { + xlink:href="P/Sd1/fraction/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#mult-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">mult(Fraction f)</link> { final Fraction f1 = new Fraction(f.numerator, denominator), f2 = new Fraction(numerator, f.denominator); @@ -4727,7 +4727,7 @@ Largest long value:9223372036854775807</screen></td> large numbers:</para> <programlisting language="java"> public Fraction <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#add-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">add(Fraction f)</link> { + xlink:href="P/Sd1/fraction/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#add-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">add(Fraction f)</link> { final long gcd = Math.getGcd(denominator, f.denominator); @@ -4736,11 +4736,11 @@ Largest long value:9223372036854775807</screen></td> }</programlisting> <para>See complete <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">implementation + xlink:href="P/Sd1/fraction/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">implementation here</link>. We may re-use out test:</para> <programlisting language="java"> public static void <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Driver.html#main-java.lang.String:A-">main(String[] args)</link> { + xlink:href="P/Sd1/fraction/V2/target/site/apidocs/de/hdm_stuttgart/mi/sd1/fraction/Driver.html#main-java.lang.String:A-">main(String[] args)</link> { // Input final Fraction @@ -4829,7 +4829,7 @@ public class Math { </annotation> <para>See <link - xlink:href="Ref/api/P/math/V0_5/de/hdm_stuttgart/de/sd1/math/Math.html">implementation + xlink:href="P/Sd1/math/V0_5/target/site/apidocs/de/hdm_stuttgart/de/sd1/math/Math.html">implementation here.</link></para> </answer> </qandaentry> @@ -6185,7 +6185,7 @@ Ratio Recursive / Loop: 65554</screen></td> <para>You may also view the <productname>Javadoc</productname> and the implementation of <link - xlink:href="Ref/api/P/math/V1/de/hdm_stuttgart/de/sd1/math/Math.html#exp-double-">double + xlink:href="P/Sd1/math/V1/target/site/apidocs/de/hdm_stuttgart/de/sd1/math/Math.html#exp-double-">double Math.exp(double)</link>. We may use the subsequent code snippet for testing and comparing our implementation:</para> @@ -6548,9 +6548,9 @@ sin(4 * PI)=-9143.306026012957, <emphasis role="bold">difference=-9143.306026012 polynomial approximation.</para> <para>You may also view the <link - xlink:href="Ref/api/P/math/V2/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">Javadoc</link> + xlink:href="P/Sd1/math/V2/target/site/apidocs/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">Javadoc</link> and the implementation of <link - xlink:href="Ref/api/P/math/V2/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double + xlink:href="P/Sd1/math/V2/target/site/apidocs/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double Math.sin(double)</link>.</para> </answer> </qandaentry> @@ -6723,7 +6723,7 @@ sin(4 * PI)=-9143.306026012957, <emphasis role="bold">difference=-9143.306026012 </annotation> <para>The following results result from <link - xlink:href="Ref/api/P/math/V3/de/hdm_stuttgart/de/sd1/math/Driver.html">this + xlink:href="P/Sd1/math/V3/target/site/apidocs/de/hdm_stuttgart/de/sd1/math/Driver.html">this test</link>:</para> <screen>Old Implementation:+++++++++++++++++++++++++++++++++++++++ @@ -7622,7 +7622,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> two rules. You may also view the <productname>Javadoc</productname> and the implementation of <link - xlink:href="Ref/api/P/math/V4/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double + xlink:href="P/Sd1/math/V4/target/site/apidocs/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double Math.sin(double)</link>.</para> </answer> </qandaentry> -- GitLab