public static boolean validate ( double [ ] [ ] weights , int numberOfComponents ) { int i ; boolean correct ; correct = ( weights != null && weights . length > 0 ) ; i = 0 ; while ( correct && i < weights . length ) { correct = ( weights [ i ] . length == numberOfComponents ) ; i ++ ; } return correct ; }
Validate if the number of components of all weight vectors has the expected dimensionality .