/** * determines the number of attributes, if the number of attributes in the * given row is greater than the current amount then this number will be * returned, otherwise the current number. * * @param row row to determine the number of attributes from * @param num the current number of attributes * @return the new number of attributes */ protected int determineNumAttributes(String row, int num) { int result; int count; result = num; count = libsvmToArray(row).length; if (count > result) { result = count; } return result; }
/** * determines the number of attributes, if the number of attributes in the * given row is greater than the current amount then this number will be * returned, otherwise the current number. * * @param row row to determine the number of attributes from * @param num the current number of attributes * @return the new number of attributes */ protected int determineNumAttributes(String row, int num) { int result; int count; result = num; count = libsvmToArray(row).length; if (count > result) { result = count; } return result; }
line = lines[j]; m_Buffer.add(libsvmToArray(line)); numAtt = determineNumAttributes(line, numAtt); m_Buffer.add(libsvmToArray(oldLine)); numAtt = determineNumAttributes(oldLine, numAtt);
line = lines[j]; m_Buffer.add(libsvmToArray(line)); numAtt = determineNumAttributes(line, numAtt); m_Buffer.add(libsvmToArray(oldLine)); numAtt = determineNumAttributes(oldLine, numAtt);