U
    L?h                     @   s<   d dl mZ d dlmZmZ d dlmZ G dd deZdS )    )Basic)adjoint	conjugate)
MatrixExprc                   @   s\   e Zd ZdZdZdd Zedd Zedd Zd	d
 Z	dd Z
dd Zdd Zdd ZdS )Adjointa,  
    The Hermitian adjoint of a matrix expression.

    This is a symbolic object that simply stores its argument without
    evaluating it. To actually compute the adjoint, use the ``adjoint()``
    function.

    Examples
    ========

    >>> from sympy import MatrixSymbol, Adjoint, adjoint
    >>> A = MatrixSymbol('A', 3, 5)
    >>> B = MatrixSymbol('B', 5, 3)
    >>> Adjoint(A*B)
    Adjoint(A*B)
    >>> adjoint(A*B)
    Adjoint(B)*Adjoint(A)
    >>> adjoint(A*B) == Adjoint(A*B)
    False
    >>> adjoint(A*B) == Adjoint(A*B).doit()
    True
    Tc                 K   s:   | j }|ddr,t|tr,t|jf |S t| j S d S )NdeepT)argget
isinstancer   r   doit)selfhintsr    r   T/var/www/html/venv/lib/python3.8/site-packages/sympy/matrices/expressions/adjoint.pyr      s    zAdjoint.doitc                 C   s
   | j d S )Nr   )argsr   r   r   r   r   &   s    zAdjoint.argc                 C   s   | j jd d d S )N)r   shaper   r   r   r   r   *   s    zAdjoint.shapec                 K   s   t | jj||f|S N)r   r   _entry)r   ijkwargsr   r   r   r   .   s    zAdjoint._entryc                 C   s   | j S r   )r   r   r   r   r   _eval_adjoint1   s    zAdjoint._eval_adjointc                 C   s
   | j  S r   )r   r   r   r   r   r   _eval_transpose4   s    zAdjoint._eval_transposec                 C   s
   | j  S r   )r   Z	transposer   r   r   r   _eval_conjugate7   s    zAdjoint._eval_conjugatec                 C   s   ddl m} t|| jS )Nr   )Trace)Z sympy.matrices.expressions.tracer   r   r   )r   r   r   r   r   _eval_trace:   s    zAdjoint._eval_traceN)__name__
__module____qualname____doc__Z
is_Adjointr   propertyr   r   r   r   r   r   r   r   r   r   r   r      s   

r   N)Z
sympy.corer   Zsympy.functionsr   r   Z"sympy.matrices.expressions.matexprr   r   r   r   r   r   <module>   s   