Formatting (MATH-677).

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1208949 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastien Brisard 2011-12-01 04:27:49 +00:00
parent c39cd6eefd
commit 56c8f7ba91
1 changed files with 71 additions and 23 deletions

View File

@ -86,29 +86,62 @@ public class FastHadamardTransformer implements RealTransformer {
* <li><b>y</b> is the output vector which is our desired result</li> * <li><b>y</b> is the output vector which is our desired result</li>
* <li>a and b are just helper rows</li> * <li>a and b are just helper rows</li>
* </ol> * </ol>
* <pre> * <table border="1" align="center">
* <code> * <tr>
* +----+----------+---------+----------+ * <th>x</th>
* | <b>x</b> | <b>a</b> | <b>b</b> | <b>y</b> | * <th>a</th>
* +----+----------+---------+----------+ * <th>b</th>
* | x<sub>0</sub> | a<sub>0</sub>=x<sub>0</sub>+x<sub>1</sub> | b<sub>0</sub>=a<sub>0</sub>+a<sub>1</sub> | y<sub>0</sub>=b<sub>0</sub>+b<sub>1</sub> | * <th>y</th>
* +----+----------+---------+----------+ * </tr>
* | x<sub>1</sub> | a<sub>1</sub>=x<sub>2</sub>+x<sub>3</sub> | b<sub>0</sub>=a<sub>2</sub>+a<sub>3</sub> | y<sub>0</sub>=b<sub>2</sub>+b<sub>3</sub> | * <tr>
* +----+----------+---------+----------+ * <td>x<sub>0</sub></td>
* | x<sub>2</sub> | a<sub>2</sub>=x<sub>4</sub>+x<sub>5</sub> | b<sub>0</sub>=a<sub>4</sub>+a<sub>5</sub> | y<sub>0</sub>=b<sub>4</sub>+b<sub>5</sub> | * <td>a<sub>0</sub> = x<sub>0</sub> + x<sub>1</sub></td>
* +----+----------+---------+----------+ * <td>b<sub>0</sub> = a<sub>0</sub> + a<sub>1</sub></td>
* | x<sub>3</sub> | a<sub>3</sub>=x<sub>6</sub>+x<sub>7</sub> | b<sub>0</sub>=a<sub>6</sub>+a<sub>7</sub> | y<sub>0</sub>=b<sub>6</sub>+b<sub>7</sub> | * <td>y<sub>0</sub> = b<sub>0</sub >+ b<sub>1</sub></td>
* +----+----------+---------+----------+ * </tr>
* | x<sub>4</sub> | a<sub>0</sub>=x<sub>0</sub>-x<sub>1</sub> | b<sub>0</sub>=a<sub>0</sub>-a<sub>1</sub> | y<sub>0</sub>=b<sub>0</sub>-b<sub>1</sub> | * <tr>
* +----+----------+---------+----------+ * <td>x<sub>1</sub></td>
* | x<sub>5</sub> | a<sub>1</sub>=x<sub>2</sub>-x<sub>3</sub> | b<sub>0</sub>=a<sub>2</sub>-a<sub>3</sub> | y<sub>0</sub>=b<sub>2</sub>-b<sub>3</sub> | * <td>a<sub>1</sub> = x<sub>2</sub> + x<sub>3</sub></td>
* +----+----------+---------+----------+ * <td>b<sub>0</sub> = a<sub>2</sub> + a<sub>3</sub></td>
* | x<sub>6</sub> | a<sub>2</sub>=x<sub>4</sub>-x<sub>5</sub> | b<sub>0</sub>=a<sub>4</sub>-a<sub>5</sub> | y<sub>0</sub>=b<sub>4</sub>-b<sub>5</sub> | * <td>y<sub>0</sub> = b<sub>2</sub> + b<sub>3</sub></td>
* +----+----------+---------+----------+ * </tr>
* | x<sub>7</sub> | a<sub>3</sub>=x<sub>6</sub>-x<sub>7</sub> | b<sub>0</sub>=a<sub>6</sub>-a<sub>7</sub> | y<sub>0</sub>=b<sub>6</sub>-b<sub>7</sub> | * <tr>
* +----+----------+---------+----------+ * <td>x<sub>2</sub></td>
* </code> * <td>a<sub>2</sub> = x<sub>4</sub> + x<sub>5</sub></td>
* </pre> * <td>b<sub>0</sub> = a<sub>4</sub> + a<sub>5</sub></td>
* <td>y<sub>0</sub> = b<sub>4</sub> + b<sub>5</sub></td>
* </tr>
* <tr>
* <td>x<sub>3</sub></td>
* <td>a<sub>3</sub> = x<sub>6</sub> + x<sub>7</sub></td>
* <td>b<sub>0</sub> = a<sub>6</sub> + a<sub>7</sub></td>
* <td>y<sub>0</sub> = b<sub>6</sub> + b<sub>7</sub></td>
* </tr>
* <tr>
* <td>x<sub>4</sub></td>
* <td>a<sub>0</sub> = x<sub>0</sub> - x<sub>1</sub></td>
* <td>b<sub>0</sub> = a<sub>0</sub> - a<sub>1</sub></td>
* <td>y<sub>0</sub> = b<sub>0</sub> - b<sub>1</sub></td>
* </tr>
* <tr>
* <td>x<sub>5</sub></td>
* <td>a<sub>1</sub> = x<sub>2</sub> - x<sub>3</sub></td>
* <td>b<sub>0</sub> = a<sub>2</sub> - a<sub>3</sub></td>
* <td>y<sub>0</sub> = b<sub>2</sub> - b<sub>3</sub></td>
* </tr>
* <tr>
* <td>x<sub>6</sub></td>
* <td>a<sub>2</sub> = x<sub>4</sub> - x<sub>5</sub></td>
* <td>b<sub>0</sub> = a<sub>4</sub> - a<sub>5</sub></td>
* <td>y<sub>0</sub> = b<sub>4</sub> - b<sub>5</sub></td>
* </tr>
* <tr>
* <td>x<sub>7</sub></td>
* <td>a<sub>3</sub> = x<sub>6</sub> - x<sub>7</sub></td>
* <td>b<sub>0</sub> = a<sub>6</sub> - a<sub>7</sub></td>
* <td>y<sub>0</sub> = b<sub>6</sub> - b<sub>7</sub></td>
* </tr>
* </table>
* *
* <b><u>How it works</u></b> * <b><u>How it works</u></b>
* <ol> * <ol>
@ -129,6 +162,21 @@ public class FastHadamardTransformer implements RealTransformer {
* </ol> * </ol>
* <br> * <br>
* <b><u>Visually</u></b> * <b><u>Visually</u></b>
* <table border="1" align="center">
* <tr>
* <td>0</td>
* <td>1</td>
* <td>2</td>
* <td>3</td>
* <td>...</td>
* <td>n + 1</td>
* </tr>
* <tr>
* <td>0</td>
* <td>x<sub>0</sub></td>
* <td colspan="5">&uarr;</td>
* </tr>
* </table>
* <pre> * <pre>
* +--------+---+---+---+-----+---+ * +--------+---+---+---+-----+---+
* | 0 | 1 | 2 | 3 | ... |n+1| * | 0 | 1 | 2 | 3 | ... |n+1|