




from typing import Any

import numpy as np





def        __UpperCAmelCase						(							lowerCamelCase_ :     np.ndarray  )       ->  bool:







			"""simple docstring"""





			return np.array_equal(lowerCamelCase_  ,							matrix.conjugate().T  )





def        __UpperCAmelCase						(							lowerCamelCase_ :     np.ndarray  ,							lowerCamelCase_ :     np.ndarray  )       ->  Any:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : Optional[Any]					  =      v.conjugate().T
			SCREAMING_SNAKE_CASE_   : Any					  =      v_star.dot(lowerCamelCase_  )
			assert isinstance(lowerCamelCase_  ,							np.ndarray  )
			return (v_star_dot.dot(lowerCamelCase_  )) / (v_star.dot(lowerCamelCase_  ))





def        __UpperCAmelCase						(							)       ->  None:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : List[Any]					  =      np.array([[2, 2 + 1J, 4], [2 - 1J, 3, 1J], [4, -1J, 1]]  )
			SCREAMING_SNAKE_CASE_   : List[str]					  =      np.array([[1], [2], [3]]  )
			assert is_hermitian(lowerCamelCase_  ), F'{a} is not hermitian.'
			print(rayleigh_quotient(lowerCamelCase_  ,							lowerCamelCase_  )  )

			SCREAMING_SNAKE_CASE_   : Any					  =      np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]  )
			assert is_hermitian(lowerCamelCase_  ), F'{a} is not hermitian.'
			assert rayleigh_quotient(lowerCamelCase_  ,							lowerCamelCase_  ) == float(3  )


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						tests()






'''simple docstring'''



def       snake_case   (	snake_case      : list					,		snake_case      : list					,		snake_case      : int					,		snake_case      : int					,		snake_case      : int			) ->  int:


    """simple docstring"""


    if index == number_of_items:
        return 0
    lowerCAmelCase 						=							0
    lowerCAmelCase 						=							0
    lowerCAmelCase 						=							knapsack(snake_case					,		snake_case					,		snake_case					,		snake_case					,		index + 1			)
    if weights[index] <= max_weight:
        lowerCAmelCase 						=							values[index] + knapsack(
            snake_case					,		snake_case					,		snake_case					,		max_weight - weights[index]					,		index + 1			)
    return max(snake_case					,		snake_case			)


if __name__ == "__main__":
     import doctest

     doctest.testmod()





