|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.LogicalTarget.CompsConvertUtils
public class CompsConvertUtils
This class contains several functions which are useful to convert the identification of the components from an one-dimesion array of integers or booleans to a two-dimension array of integers with ranges of components, and vice-versa.
| Constructor Summary | |
|---|---|
CompsConvertUtils()
|
|
| Method Summary | |
|---|---|
static int[][] |
componentsExpandedToRangeOfComponents(boolean[] comps)
Changes the representation from the components as an one-dimensional array to a bi-dimensional array of ranges. |
static int[][] |
componentsToRangeOfComponents(int[] comps)
This method converts the number of components from an one-dimension array structure to a two-dimension array with ranges of components. |
static int[][] |
componentsToRangeOfComponents(int[] comps,
int maxComps)
Deprecated. |
static int[][] |
joinOverlapedRanges(int[][] compsRanges)
This method joins overlaped ranges of components. |
static int[] |
rangeOfComponentsToComponents(int[][] rangeOfComps)
This method converts form a bi-dimensional array with the ranges of components (first and last component) to an one-dimensional array with the number of the components. |
static boolean[] |
rangeOfComponentsToComponentsExpanded(int[][] rangeOfComps,
int maxComps)
This method converts form a bi-dimensional array with the ranges of components (first and last component) to an one-dimensional array with the number of the components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompsConvertUtils()
| Method Detail |
|---|
@Deprecated
public static int[][] componentsToRangeOfComponents(int[] comps,
int maxComps)
comps - an array with the component number.maxComps - is the maximum number of components
public static int[][] componentsToRangeOfComponents(int[] comps)
comps - an array with the component number.
public static int[] rangeOfComponentsToComponents(int[][] rangeOfComps)
rangeOfComps - a bi-dimensional array with the ranges of the
components. The first dimension is the index of the
range and the second dimension indicates: 0 the
first component of the range, and 1 the last
component of the range.
public static boolean[] rangeOfComponentsToComponentsExpanded(int[][] rangeOfComps,
int maxComps)
rangeOfComps - a bi-dimensional array with the ranges of the
components. The first dimension is the index of the
range and the second dimension indicates: 0 the
first component of the range, and 1 the last
component of the range.maxComps - is the maximum number of components.
true
, it means the component is chosen. Otherwise, it is not
chosen.public static int[][] componentsExpandedToRangeOfComponents(boolean[] comps)
comps is an one-dimensional with length the maximum image
components where the selected components are true.
comps - an one-dimensional array with the indexes of the selected
components set to true value.
public static int[][] joinOverlapedRanges(int[][] compsRanges)
compsRanges -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||