ap clustering