List of utility methods to do Integer Divide
int | divCeil(int pNum, int pDivisor) div Ceil boolean sign = pNum > 0 ^ pDivisor > 0; pNum = Math.abs(pNum); pDivisor = Math.abs(pDivisor); return sign ? -pNum / pDivisor : (pNum + pDivisor - 1) / pDivisor; |
int | divCeil(int value, int divisor) div Ceil int result = value / divisor; if (value % divisor != 0) { result++; return result; |
int[] | divData(int numTest, int numTrain) div Data int[] select = new int[numTest]; int tem1 = 0; for (int i = 0; i < numTest; i = i + 2) { select[tem1] = i; if (tem1 < numTest - 1) { select[tem1 + 1] = numTrain + numTest - 1 - i; tem1 = tem1 + 2; } else { ... |
boolean | dividable(final String charBitmap, final int row) dividable return (charBitmap.length() % row) == 0;
|
String[] | divide(final String bitmap, final int row) divide final String[] rows = new String[row]; for (int i = 0; i < row; i++) { final int start = i * row; rows[i] = bitmap.substring(start, start + row); return rows; |
double | divide(int numerator, int denominator) divide return (double) numerator / denominator; |
double | divide(int numerator, int denominator) divide return (double) numerator / denominator; |
float | divide(int value, int divideBy) divide float result; Float floatValue = new Float(value); Float floatDivideBy = new Float(divideBy); result = floatValue.floatValue() / floatDivideBy.floatValue(); return result; |
int | divide(int x, int y) divide int z = x / y; return z < 0 ? z - 1 : z; |
void | Divide(Object in, int val) Divide if (in == null) return; if (val == 0) return; if (in instanceof int[]) { int[] inn = (int[]) in; for (int i = 0, s = inn.length; i < s; i++) inn[i] /= val; ... |