Optimal CP-based Synthesis of Real Linear Arrays