private int getBondTypes(int idx) {
        int btypes = container.getAtom(idx).getImplicitHydrogenCount();
        for (int end : graph[idx]) {
            IBond bond = edgeToBond.get(idx, end);
            if (bond.getOrder() == SINGLE)
                btypes += 0x00_0001;
            else if (bond.getOrder() == DOUBLE)
                btypes += 0x00_0100;
            else // other bond types
                btypes += 0x01_0000;
        }
        return btypes;
    }
private int getBondTypes ( int idx ) { int btypes = container . getAtom ( idx ) . getImplicitHydrogenCount ( ) ; for ( int end : graph [ idx ] ) { IBond bond = edgeToBond . get ( idx , end ) ; if ( bond . getOrder ( ) == SINGLE ) btypes += 0x00_0001 ; else if ( bond . getOrder ( ) == DOUBLE ) btypes += 0x00_0100 ; else btypes += 0x01_0000 ; } return btypes ; }
Generate a bond type code for a given atom. The bond code
can be quickly tested to count the number of single, double,
or 'other' bonds.

@param idx the atom idx
@return bond code