B
    ˜‘[m  ã               @   sX   d dl mZmZ d dlmZ d dlmZmZ d dlm	Z	 d dl
mZ G dd„ deƒZdS )	é    )Úprint_functionÚdivision)ÚBasic)ÚadjointÚ	conjugate)Ú	transpose)Ú
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 )ÚAdjointaX  
    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.matrices import MatrixSymbol, Adjoint
    >>> from sympy.functions import 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 )NZdeepT)ÚargÚgetÚ
isinstancer   r   Údoit)ÚselfZhintsr
   © r   úAlib/python3.7/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
   Úshape)r   r   r   r   r   .   s    zAdjoint.shapec             C   s   t | j ||¡ƒS )N)r   r
   Ú_entry)r   ÚiÚjr   r   r   r   2   s    zAdjoint._entryc             C   s   | j S )N)r
   )r   r   r   r   Ú_eval_adjoint5   s    zAdjoint._eval_adjointc             C   s
   t | jƒS )N)r   r
   )r   r   r   r   Ú_eval_conjugate8   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_tracec             C   s
   t | jƒS )N)r   r
   )r   r   r   r   Ú_eval_transpose?   s    zAdjoint._eval_transposeN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Z
is_Adjointr   Úpropertyr
   r   r   r   r   r   r   r   r   r   r   r	   	   s   r	   N)Z
__future__r   r   Z
sympy.corer   Zsympy.functionsr   r   Z$sympy.matrices.expressions.transposer   Z"sympy.matrices.expressions.matexprr   r	   r   r   r   r   Ú<module>   s
   