protected void aliasGeneric ( Object variable , String name ) { if ( variable . getClass ( ) == Integer . class ) { alias ( ( ( Integer ) variable ) . intValue ( ) , name ) ; } else if ( variable . getClass ( ) == Double . class ) { alias ( ( ( Double ) variable ) . doubleValue ( ) , name ) ; } else if ( variable . getClass ( ) == DMatrixRMaj . class ) { alias ( ( DMatrixRMaj ) variable , name ) ; } else if ( variable . getClass ( ) == FMatrixRMaj . class ) { alias ( ( FMatrixRMaj ) variable , name ) ; } else if ( variable . getClass ( ) == DMatrixSparseCSC . class ) { alias ( ( DMatrixSparseCSC ) variable , name ) ; } else if ( variable . getClass ( ) == SimpleMatrix . class ) { alias ( ( SimpleMatrix ) variable , name ) ; } else if ( variable instanceof DMatrixFixed ) { DMatrixRMaj M = new DMatrixRMaj ( 1 , 1 ) ; ConvertDMatrixStruct . convert ( ( DMatrixFixed ) variable , M ) ; alias ( M , name ) ; } else if ( variable instanceof FMatrixFixed ) { FMatrixRMaj M = new FMatrixRMaj ( 1 , 1 ) ; ConvertFMatrixStruct . convert ( ( FMatrixFixed ) variable , M ) ; alias ( M , name ) ; } else { throw new RuntimeException ( "Unknown value type of " + ( variable . getClass ( ) . getSimpleName ( ) ) + " for variable " + name ) ; } }
Aliases variables with an unknown type .