class ISINGrid {

    public int getBinIndex(Point gridPoint) {
        final int colIndex = gridPoint.x;
        final int rowIndex = gridPoint.y;
        if (rowIndex >= 0 && rowIndex < rowCount) {
            if (colIndex >= 0 && colIndex < rowLength[rowIndex]) {
                return binOffsets[rowIndex] + colIndex;
            }
        }
        return -1;
    }

    public  ISINGrid(int rowCount);

}