|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
MatrixUtils.java | 0% | 0% | 0% | 0% |
|
1 |
/*
|
|
2 |
* Joey and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*/
|
|
5 |
package org.asyrinx.brownie.core.collection.matrix;
|
|
6 |
|
|
7 |
import java.util.ArrayList;
|
|
8 |
import java.util.List;
|
|
9 |
|
|
10 |
/**
|
|
11 |
* @author Akima
|
|
12 |
*/
|
|
13 |
public final class MatrixUtils { |
|
14 |
|
|
15 |
/**
|
|
16 |
* Constructor for MatrixUtils.
|
|
17 |
*/
|
|
18 | 0 |
private MatrixUtils() {
|
19 | 0 |
super();
|
20 |
} |
|
21 |
|
|
22 | 0 |
static public void convert(MapMatrix source, ListMatrix dest) { |
23 | 0 |
convert(source, dest, new ArrayList(source.colKeySet()), new ArrayList( |
24 |
source.rowKeySet())); |
|
25 |
} |
|
26 |
|
|
27 | 0 |
static public void convert(MapMatrix source, ListMatrix dest, |
28 |
List sourceColOrder, List sourceRowOrder) { |
|
29 | 0 |
for (int r = 0; r < sourceRowOrder.size(); r++) { |
30 | 0 |
Object row = sourceRowOrder.get(r); |
31 | 0 |
for (int c = 0; c < sourceColOrder.size(); c++) { |
32 | 0 |
Object col = sourceColOrder.get(c); |
33 | 0 |
dest.put(c, r, source.get(col, row)); |
34 |
} |
|
35 |
} |
|
36 |
} |
|
37 |
|
|
38 |
} |
|