def __init__(self, variables, parameters=None, verbose=<NUM_LIT:0>, normalized=True,<EOL>parallel=False):
super(SdpRelaxation, self).__init__()<EOL>self.verbose = verbose<EOL>self.monomial_index = {}<EOL>self.var_offsets = [<NUM_LIT:0>]<EOL>self.variables = []<EOL>self.normalized = normalized<EOL>self.substitutions = {}<EOL>self.pure_substitution_rules = True<EOL>self.monomial_sets = []<EOL>self.level = <NUM_LIT:0><EOL>self.moment_substitutions = {}<EOL>self.complex_matrix = False<EOL>self.localizing_monomial_sets = None<EOL>self.constraint_starting_block = <NUM_LIT:0><EOL>self.constraints = []<EOL>self._constraint_to_block_index = {}<EOL>self._moment_equalities = []<EOL>self._n_inequalities = <NUM_LIT:0><EOL>self._original_F = None<EOL>self._original_obj_facvar = <NUM_LIT:0><EOL>self._original_constant_term = <NUM_LIT:0><EOL>self._new_basis = None<EOL>self._time0 = None<EOL>n_noncommutative_hermitian = <NUM_LIT:0><EOL>n_noncommutative_nonhermitian = <NUM_LIT:0><EOL>n_commutative_hermitian = <NUM_LIT:0><EOL>n_commutative_nonhermitian = <NUM_LIT:0><EOL>if isinstance(variables, list):<EOL><INDENT>if len(variables) > <NUM_LIT:0> and (isinstance(variables[<NUM_LIT:0>], list) or<EOL>isinstance(variables[<NUM_LIT:0>], tuple)):<EOL><INDENT>self.variables = [unique(vs) for vs in variables]<EOL><DEDENT>else:<EOL><INDENT>self.variables = unique(variables)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.variables = [variables]<EOL><DEDENT>for vs in self.variables:<EOL><INDENT>if not isinstance(vs, list) and not isinstance(vs, tuple):<EOL><INDENT>vs = [vs]<EOL><DEDENT>for v in vs:<EOL><INDENT>if v.is_commutative and (v.is_hermitian is None or<EOL>v.is_hermitian):<EOL><INDENT>n_commutative_hermitian += <NUM_LIT:1><EOL><DEDENT>elif v.is_commutative:<EOL><INDENT>n_commutative_nonhermitian += <NUM_LIT:1><EOL><DEDENT>elif not v.is_commutative and (v.is_hermitian is None or<EOL>v.is_hermitian):<EOL><INDENT>n_noncommutative_hermitian += <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>n_noncommutative_nonhermitian += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>self.parameters = parameters<EOL>info = "<STR_LIT>"<EOL>if n_commutative_hermitian > <NUM_LIT:0>:<EOL><INDENT>info += str(n_commutative_hermitian) + "<STR_LIT>"<EOL><DEDENT>if n_commutative_nonhermitian > <NUM_LIT:0>:<EOL><INDENT>if len(info) > <NUM_LIT:0>:<EOL><INDENT>info += "<STR_LIT:U+002CU+0020>"<EOL><DEDENT>info += str(n_commutative_nonhermitian) +"<STR_LIT>"<EOL><DEDENT>if n_noncommutative_hermitian > <NUM_LIT:0>:<EOL><INDENT>if len(info) > <NUM_LIT:0>:<EOL><INDENT>info += "<STR_LIT:U+002CU+0020>"<EOL><DEDENT>info += str(n_noncommutative_hermitian) +"<STR_LIT>"<EOL><DEDENT>if n_noncommutative_nonhermitian > <NUM_LIT:0>:<EOL><INDENT>if len(info) > <NUM_LIT:0>:<EOL><INDENT>info += "<STR_LIT:U+002CU+0020>"<EOL><DEDENT>info += str(n_noncommutative_nonhermitian) +"<STR_LIT>"<EOL><DEDENT>if len(info) > <NUM_LIT:0>:<EOL><INDENT>info += "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>info += "<STR_LIT>"<EOL><DEDENT>info = "<STR_LIT>" + info<EOL>if parameters is not None:<EOL><INDENT>info += "<STR_LIT>" + str(len(flatten(parameters))) +"<STR_LIT>"<EOL><DEDENT>if self.verbose > <NUM_LIT:0>:<EOL><INDENT>print(info)<EOL><DEDENT>self._parallel = False<EOL>if parallel:<EOL><INDENT>try:<EOL><INDENT>n_cpu = cpu_count()<EOL>self._parallel = parallel<EOL>if self.verbose > <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>" % n_cpu)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>print("<STR_LIT>",<EOL>file=sys.stderr)<EOL><DEDENT><DEDENT>
Constructor for the class.