Fast recognition of partial star products and quasi cartesian products