protected static class RegionPlacementMaintainer.RandomizedMatrix extends Object
| Constructor and Description | 
|---|
RegionPlacementMaintainer.RandomizedMatrix(int rows,
                                          int cols)
Create a randomization scheme for a matrix of a given size. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
float[][] | 
invert(float[][] matrix)
Copy a given matrix into a new matrix, transforming each row index and
 each column index according to the inverse of the randomization scheme
 that was created at construction time. 
 | 
int[] | 
invertIndices(int[] indices)
Given an array where each element  
indices[i] represents the
 randomized column index corresponding to randomized row index i,
 create a new array with the corresponding inverted indices. | 
float[][] | 
transform(float[][] matrix)
Copy a given matrix into a new matrix, transforming each row index and
 each column index according to the randomization scheme that was created
 at construction time. 
 | 
public RegionPlacementMaintainer.RandomizedMatrix(int rows,
                                          int cols)
rows - the number of rows in the matrixcols - the number of columns in the matrixpublic float[][] transform(float[][] matrix)
matrix - the cost matrix to transformpublic float[][] invert(float[][] matrix)
matrix - the cost matrix to be invertedpublic int[] invertIndices(int[] indices)
indices[i] represents the
 randomized column index corresponding to randomized row index i,
 create a new array with the corresponding inverted indices.indices - an array of transformed indices to be invertedCopyright © 2014 The Apache Software Foundation. All rights reserved.