+
    i{!                    .   ^ RI Ht ^ RIHtHtHtHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt ^ RIt ! R R]4      t ! R	 R
]]4      t ! R R]]4      t ! R R]]4      t ! R R]]4      t]]n        ]]n        ]]n        ]]n        ]]n        ]! 4       ]n        R# )    )annotations)BasisDependentBasisDependentAddBasisDependentMulBasisDependentZero)SPow)
AtomicExpr)ImmutableDenseMatrixNc                      ] tR t^t$ RtRtR]R&   R]R&   R]R&   R]R&   R]R&   R	]R
&   ]R 4       tR t	R t
]	P                  ]
n        R tR t]P                  ]n        RR ltR tRtR# )Dyadicz
Super class for all Dyadic-classes.

References
==========

.. [1] https://en.wikipedia.org/wiki/Dyadic_tensor
.. [2] Kane, T., Levinson, D. Dynamics Theory and Applications. 1985
       McGraw-Hill

g      *@ztype[Dyadic]
_expr_type	_mul_func	_add_func
_zero_func
_base_func
DyadicZerozeroc                    V P                   # )z
Returns the components of this dyadic in the form of a
Python dictionary mapping BaseDyadic instances to the
corresponding measure numbers.

)_componentsselfs   &Q/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/vector/dyadic.py
componentsDyadic.components!   s         c                   \         P                  P                  p\        V\        4      '       d   VP
                  # \        W4      '       d{   VP
                  pV P                  P                  4        FN  w  rEVP                  ^,          P                  V4      pW6V,          VP                  ^ ,          ,          ,          pKP  	  V# \        V\        4      '       d   \        P
                  pV P                  P                  4        F  w  rVP                  P                  4        F  w  rVP                  ^,          P                  V
P                  ^ ,          4      pVP                  ^ ,          P                  V
P                  ^,          4      pWvV	,          V,          V,          ,          pK  	  K  	  V# \        R\        \        V4      4      ,           R,           4      h)a  
Returns the dot product(also called inner product) of this
Dyadic, with another Dyadic or Vector.
If 'other' is a Dyadic, this returns a Dyadic. Else, it returns
a Vector (unless an error is encountered).

Parameters
==========

other : Dyadic/Vector
    The other Dyadic or Vector to take the inner product with

Examples
========

>>> from sympy.vector import CoordSys3D
>>> N = CoordSys3D('N')
>>> D1 = N.i.outer(N.j)
>>> D2 = N.j.outer(N.j)
>>> D1.dot(D2)
(N.i|N.j)
>>> D1.dot(N.j)
N.i

z!Inner product is not defined for z and Dyadics.)sympyvectorVector
isinstancer   r   r   itemsargsdotr   outer	TypeErrorstrtype)r   otherr    outveckvvect_dotoutdyadk1v1k2v2outer_products   &&           r   r$   
Dyadic.dot-   s^   6 $$e/00;;&&[[F--/66!9==/Q,22 0 Mv&&kkG////1#..446FB!wwqz~~bggaj9H$&GGAJ$4$4RWWQZ$@M"}r1MAAG 7 2
 N?U,-/>? @ @r   c                	$    V P                  V4      # N)r$   r   r)   s   &&r   __and__Dyadic.__and__]   s    xxr   c                   \         P                  P                  pWP                  8X  d   \        P                  # \        W4      '       d   \        P                  pV P                  P                  4        FX  w  rEVP                  ^,          P                  V4      pVP                  ^ ,          P                  V4      pW5V,          ,          pKZ  	  V# \        \        \        V4      4      R,           R,           4      h)a7  
Returns the cross product between this Dyadic, and a Vector, as a
Vector instance.

Parameters
==========

other : Vector
    The Vector that we are crossing this Dyadic with

Examples
========

>>> from sympy.vector import CoordSys3D
>>> N = CoordSys3D('N')
>>> d = N.i.outer(N.i)
>>> d.cross(N.j)
(N.i|N.k)

z not supported for zcross with dyadics)r   r   r    r   r   r!   r   r"   r#   crossr%   r&   r'   r(   )r   r)   r    r.   r+   r,   cross_productr%   s   &&      r   r;   Dyadic.crossb   s    , $$KK;;&&kkG--/ !q	 6q	6u9$ 0 NCU,/DD01 2 2r   c                	$    V P                  V4      # r6   )r;   r7   s   &&r   __xor__Dyadic.__xor__   s    zz%  r   Nc           
         Vf   Tp\        V UUu. uF+  pV F"  qCP                  V 4      P                  V4      NK$  	  K-  	  upp4      P                  ^^4      # u uppi )a-  
Returns the matrix form of the dyadic with respect to one or two
coordinate systems.

Parameters
==========

system : CoordSys3D
    The coordinate system that the rows and columns of the matrix
    correspond to. If a second system is provided, this
    only corresponds to the rows of the matrix.
second_system : CoordSys3D, optional, default=None
    The coordinate system that the columns of the matrix correspond
    to.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> N = CoordSys3D('N')
>>> v = N.i + 2*N.j
>>> d = v.outer(N.i)
>>> d.to_matrix(N)
Matrix([
[1, 0, 0],
[2, 0, 0],
[0, 0, 0]])
>>> from sympy import Symbol
>>> q = Symbol('q')
>>> P = N.orient_new_axis('P', q, N.k)
>>> d.to_matrix(N, P)
Matrix([
[  cos(q),   -sin(q), 0],
[2*cos(q), -2*sin(q), 0],
[       0,         0, 0]])

)Matrixr$   reshape)r   systemsecond_systemijs   &&&  r   	to_matrixDyadic.to_matrix   sb    N  "M6 &6a$ ?@uuT{q)$ *6 & ''.wq!}	5 &s   1A
c                    \        V \        4      '       d"   \        V\        4      '       d   \        R4      h\        V \        4      '       d%   \        V \	        V\
        P                  4      4      # \        R4      h)z&Helper for division involving dyadics zCannot divide two dyadicszCannot divide by a dyadic)r!   r   r&   	DyadicMulr	   r   NegativeOne)oner)   s   &&r   _div_helperDyadic._div_helper   sX    c6""z%'@'@788V$$S#eQ]]";<<788r    r6   )__name__
__module____qualname____firstlineno____doc___op_priority__annotations__propertyr   r$   r8   r;   r?   rH   rN   __static_attributes__rP   r   r   r   r      s    
 L
	  	 .@` kkGO"2H! mmGO+5Z9r   r   c                  8   a  ] tR t^tRtV 3R ltR tR tRtV ;t	# )
BaseDyadicz1
Class to denote a base dyadic tensor component.
c                	  < \         P                  P                  p\         P                  P                  p\         P                  P                  p\        WV34      '       d   \        W$V34      '       g   \        R4      hWP                  8X  g   W#P                  8X  d   \        P                  # \        SV `)  WV4      pWfn        ^Vn        V\        P                  /Vn        VP                   Vn        RVP"                  ,           R,           VP"                  ,           R,           Vn        RVP$                  ,           R,           VP$                  ,           R,           Vn        V# )z*BaseDyadic cannot be composed of non-base (|)z\left(z
{\middle|}z\right)z1BaseDyadic cannot be composed of non-base vectors)r   r   r    
BaseVector
VectorZeror!   r&   r   r   super__new___base_instance_measure_numberr   Oner   _sys_pretty_form_latex_form)clsvector1vector2r    r`   ra   obj	__class__s   &&&    r   rc   BaseDyadic.__new__   s   $$\\,,
\\,,
'
#;<<wZ(@AA & ' ' #w++'=;;gocG4 ,<<'"6"66<$112478$w':'::]J"../1;< 
r   c                	    R P                  VP                  V P                  ^ ,          4      VP                  V P                  ^,          4      4      # )z({}|{})format_printr#   r   printers   &&r   	_sympystrBaseDyadic._sympystr   s>    NN499Q<('..1*FH 	Hr   c                	    R P                  VP                  V P                  ^ ,          4      VP                  V P                  ^,          4      4      # )zBaseDyadic({}, {})rq   rt   s   &&r   
_sympyreprBaseDyadic._sympyrepr   s>    #**NN499Q<('..1*FH 	Hr   rP   )
rQ   rR   rS   rT   rU   rc   rv   ry   rY   __classcell__)rn   s   @r   r[   r[      s    2HH Hr   r[   c                  @    ] tR t^tRtR t]R 4       t]R 4       tRt	R# )rK   z$Products of scalars and BaseDyadics c                	:    \         P                  ! V .VO5/ VB pV# r6   )r   rc   rj   r#   optionsrm   s   &*, r   rc   DyadicMul.__new__   !    ''>d>g>
r   c                    V P                   # )z(The BaseDyadic involved in the product. )rd   r   s   &r   base_dyadicDyadicMul.base_dyadic   s     """r   c                    V P                   # )zDThe scalar expression involved in the definition of
this DyadicMul.
)re   r   s   &r   measure_numberDyadicMul.measure_number   s    
 ###r   rP   N)
rQ   rR   rS   rT   rU   rc   rX   r   r   rY   rP   r   r   rK   rK      s2    / # # $ $r   rK   c                  &    ] tR t^tRtR tR tRtR# )	DyadicAddzClass to hold dyadic sums c                	:    \         P                  ! V .VO5/ VB pV# r6   )r   rc   r~   s   &*, r   rc   DyadicAdd.__new__   r   r   c                	   a \        V P                  P                  4       4      pVP                  R  R7       RP	                  V3R lV 4       4      # )c                0    V ^ ,          P                  4       # )r   )__str__)xs   &r   <lambda>%DyadicAdd._sympystr.<locals>.<lambda>  s    1r   )keyz + c              3  V   <"   T F  w  rSP                  W,          4      x  K   	  R # 5ir6   )rs   ).0r+   r,   ru   s   &  r   	<genexpr>&DyadicAdd._sympystr.<locals>.<genexpr>  s!     BEDA'..//Es   &))listr   r"   sortjoin)r   ru   r"   s   &f r   rv   DyadicAdd._sympystr  s>    T__**,-

/
0zzBEBBBr   rP   N)rQ   rR   rS   rT   rU   rc   rv   rY   rP   r   r   r   r      s    %Cr   r   c                  ,    ] tR tRtRtRtRtRtR tRt	R# )	r   i
  z
Class to denote a zero dyadic
g333333*@z(0|0)z#(\mathbf{\hat{0}}|\mathbf{\hat{0}})c                	2    \         P                  ! V 4      pV# r6   )r   rc   )rj   rm   s   & r   rc   DyadicZero.__new__  s     ((-
r   rP   N)
rQ   rR   rS   rT   rU   rV   rh   ri   rc   rY   rP   r   r   r   r   
  s     LL8Kr   r   )
__future__r   sympy.vector.basisdependentr   r   r   r   
sympy.corer   r	   sympy.core.exprr
   sympy.matrices.immutabler   rB   sympy.vectorr   r   r[   rK   r   r   r   r   r   r   r   r   rP   r   r   <module>r      s    "P P  & C t9^ t9n$H $HN$!6 $(
C!6 
C#V       lr   