public boolean cyclic ( IBond bond ) { // XXX: linear search - but okay for now int u = container . indexOf ( bond . getBegin ( ) ) ; int v = container . indexOf ( bond . getEnd ( ) ) ; if ( u < 0 || v < 0 ) throw new NoSuchElementException ( "atoms of the bond are not found in the container" ) ; return searcher . cyclic ( u , v ) ; }
Determine whether the bond is cyclic . Note this currently requires a linear search to look - up the indices of each atoms .