
    Yhj]                         d Z dZg dZddlZddlmZ ddlmZ dd	l	m
Z
mZmZmZ dd
lmZ ddlmZmZmZmZmZmZmZmZ ddlmZmZmZ  G d de          Zd Zd Z G d dee          Z  G d dee          Z!dS )zSparse DIAgonal formatzrestructuredtext en)	dia_array
dia_matrixisspmatrix_dia    N   )copy_if_needed   )spmatrix)issparse_formats_spbasesparray)_data_matrix)isdenseisscalarlikeisshapeupcast_chargetdtypeget_sum_dtypevalidateaxischeck_shape)
dia_matmat
dia_matvecdia_matvecsc                       e Zd ZdZddddZd Zd ZddZej        j	        e_	        dd	Z
ej
        j	        e
_	        dd
Zej        j	        e_	        ddZ fdZd Z fdZd Zd Z fdZd dZddZej        j	        e_	        d!dZej        j	        e_	        d dZej        j	        e_	        ddZej        j	        e_	        ddZej        j	        e_	        d"dZd Zej        j	        e_	         xZS )#	_dia_basediaNFmaxprintc                   t          j        | ||           t          |          r|j        dk    rI|r|                                }|j        | _        |j        | _        t          |j                  | _	        n|j        | j        k    r|r|                                }n|
                                }|j        | _        |j        | _        t          |j                  | _	        ndt          |t                    rzt          |          rt          |          | _	        t          j        dt!          |t"                              | _        |                     t'          | j                            }t          j        d|          | _        n	 |\  }}	|t)          d          |st*          }t          j        t          j        |d         ||	                    | _        t          j        |d
         |                     t'          |                    |	          }	t          j        |	          | _        t          |          | _	        n# t2          $ r}
d}t)          |          |
d }
~
ww xY w	 t          j        |          }n+# t2          $ r}
t)          d| j         d          |
d }
~
ww xY wt          | t6                    r#|j        dk    rt)          d|j         d          |                     |||          
                                }|j        | _        |j        | _        t          |j                  | _	        |.t!          |          }| j                            |          | _        | j        j        d
k    rt)          d          | j        j        dk    rt)          d          | j        j        d         t?          | j                  k    r8t)          d| j        j        d          dt?          | j                   d          t?          t          j         | j                            t?          | j                  k    rt)          d          d S )Nr   r   )r   r   )defaultmaxvalr   dtypezexpected a shape argument)r$   copyr   z+unrecognized form for dia_array constructorzunrecognized form for z_matrix constructorr   zDIA arrays don't support zD input. Use 2D)r$   shapezoffsets array must have rank 1zdata array must have rank 2znumber of diagonals (z() does not match the number of offsets ()z&offset array contains duplicate values)!r   __init__r
   formatr%   dataoffsetsr   r&   _shapetodia
isinstancetupler   npzerosr   float_get_index_dtypemax
ValueErrorr   
atleast_2darray
atleast_1d	Exceptionasarrayr   ndim_coo_containerastypelenunique)selfarg1r&   r$   r%   r   A	idx_dtyper*   r+   emessagenewdtypes                c/var/www/tools.fuzzalab.pt/emblema-extractor/venv/lib/python3.11/site-packages/scipy/sparse/_dia.pyr(   z_dia_base.__init__   s8   dD8<<<<D>> 5	/{e## '99;;D I	#|)$*55;$+--$-		AA

AF	 y)!'22e$$ &	/t}} 5 *$//HUHUE,J,J,JKK	 11TZ1II	!x9===5$(MD'
 }()DEEE .- "bhtAweRV.W.W.W X XDI htAw-1-B-B#e**-B-U-U,02 2 2G $&=#9#9DL"-e"4"4DKK ! 5 5 5KG$W--145 Mz$'' M M M  "E$(K"E "E "E F FKLMM $(( YTY!^^ !WTY!W!W!WXXX##DU#CCIIKKADI9DL%ag..DKH	((22DI <!!=>>>9>Q:;;;9?1T\!2!2224	(: 4 4"4<004 4 4   ry&&''3t|+<+<<<EFFF =<s0   I 
I6I11I6:J 
J7J22J7c                     t           | j                 \  }}t          | t                    rdnd}| j        j        d         }d| d| d| j         d| j         d| d	| j         d
S )Nr7   matrixr   <z sparse z of dtype 'z'
	with z stored elements (z diagonals) and shape >)r   r)   r.   r   r*   r&   r$   nnz)r@   _fmt
sparse_clsds        rG   __repr__z_dia_base.__repr__d   s    $+&3 *4 9 9GWWx
IOAY Y YZ Y YDJ Y YhY Y23Y YKO:Y Y Y	
    c                     | j         \  }}t          j        | j        j         d                   }|| j        dddf         z
  }|dk    }|||k     z  }|||k     z  }|S )z~Returns a mask of the same shape as self.data, where
        mask[i,j] is True when data[i,j] corresponds to a stored element.r   Nr   )r&   r0   aranger*   r+   )r@   num_rowsnum_colsoffset_indsrowmasks         rG   
_data_maskz_dia_base._data_maskm   sl     "Z(i	 233DL400qx x'(rR   c                     |t          d          |                                 }t          j        | j        |                   S )Nz<count_nonzero over an axis is not implemented for DIA format)NotImplementedErrorrZ   r0   count_nonzeror*   )r@   axisrY   s      rG   r]   z_dia_base.count_nonzerox   sE    %N     	$000rR   c                     |t          d          | j        \  }}d}| j        D ]5}|dk    r|t          |||z
            z  }|t          ||z   |          z  }6t	          |          S )Nz6_getnnz over an axis is not implemented for DIA formatr   )r\   r&   r+   minint)r@   r^   MNrL   ks         rG   _getnnzz_dia_base._getnnz   s    % '7 8 8 8j! 	" 	"A1uus1QqSzz!s1Q3qzz!3xxrR   c           
      @   t          |          }t          | j                  }| j        \  }}d }|dk    r|                                 }| j        |z                      d          }	|	j        d         |k    r|	}
n-t          j        ||	j                  }
|	|
d |	j        d         <   | 	                    |
|          }nt          j        |df|          }t          j
        ||          }t          ||t          | j                  | j        j        d         | j        | j        ||           | 	                    |          }||                    ||          S | 	                    |                    |                    }|                    d||          S )	Nr   r   r^   r#   r   )r$   out )r^   r$   ri   )r   r   r$   r&   rZ   r*   sumr0   r1   _ascontaineronesr   r>   r+   )r@   r^   r$   ri   	res_dtyperU   rV   retrY   xresrow_sumsones                rG   rk   z_dia_base.sum   s   D!!!$*--	!Z(4<<??$$DT!&&A&..AwqzX%%hxqw777#$KQWQZK ##Cy#99CC x1Y???H'()444Cx3t|+<+<yq)4<CS S S ((22H|||%S|999##HLLdL$;$;<<CwwBew555rR   c                    t          |t                    s|                    |           S t          j        | j        |j                  r3|                     |r| j        |j        z
  n| j        |j        z             S t          j        | j        |j                  }t          j	        || j                  }t          j	        ||j                  }| j        j
        d         }|j        j
        d         }||k    rwt          |          t          | j                  k    rR| j        t          |                   }|r||d d fxx         |j        z  cc<   n{||d d fxx         |j        z  cc<   n`||k    rwt          |          t          |j                  k    rR|r|j        t          |                    }n|j        t          |                   }||d d fxx         | j        z  cc<   nt          | j
        d         |d         z   | j
        d                   }	t          j        t          |          |	ft          j        | j        |j                            }||d |fxx         | j        d d d |	f         z  cc<   |r&||d |fxx         |j        d d d |	f         z  cc<   n%||d |fxx         |j        d d d |	f         z  cc<   |                     ||f| j
                  S )Nr   r   r#   r&   )r.   r   _add_sparser0   array_equalr+   
_with_datar*   union1dsearchsortedr&   r>   _invert_indexr`   r1   result_type_dia_container)
r@   othersubnew_offsetsself_idx	other_idxself_dother_dnew_datarP   s
             rG   rw   z_dia_base._add_sparse   s'   %++ 	+$$T*** >$,66 	;??S $:49uz#9#9#'9uz#9; ; ; ju}==?;==OK??	#*"1% W[!1!1S5F5F!F!Fyx!8!89H 5AAA&&&%*4&&&&AAA&&&%*4&&&&w3{#3#3s5=7I7I#I#I @!J}Y'?'?@@ :mI&>&>?Xqqq[!!!TY.!!!! DJqMKO3TZ]CCA x[!!1%nTY
;;  H Xww&'''49QQQU+;;''' CHWH,---AAArrE1BB----HWH,---AAArrE1BB---""Hk#:$*"MMMrR   c                     t          |t                    s!t                                          |          S |                     |d          S )NT)r   )r.   r   super_sub_sparserw   )r@   r   	__class__s     rG   r   z_dia_base._sub_sparse   sF    %++ 	.77&&u---4000rR   c                 <    |                      | j        |z            S N)ry   r*   )r@   r   s     rG   _mul_scalarz_dia_base._mul_scalar   s    ty50111rR   c                 V   t          |          r|                     |          S t          |          r|j        dk    r|                                 |z  S d| j        v sd| j        v s	d|j        v r!t                                          |          S t          j	        |          }|j        \  }}| j        \  }}t          | j        j        d         |          }| j        d d d |f                             t          j        | j        |                    }|dk    r||dd |f         z  }n||k    rt          d          t          j        |          }||k    r|| j        d d d f         z
  |z  }	n|| j        d d d f         |z  z
  }	|dk    rd}n||k    rt          d          |||	|f         z  }|                     |          S t%          |t&                    r|j        | j        k    r!t                                          |          S t          j        | j        |j        dd          \  }
}}t          | j        j        d         |j        j        d                   }| j        |d |f         |j        |d |f         z  }|                     ||
f| j                  S )Nr   r   r   zinconsistent shapesT)assume_uniquereturn_indicesrv   )r   r   r   r;   toarrayr&   r   multiplyr0   r6   r`   r*   r=   r}   r5   rT   r+   ry   r.   r   intersect1dr~   )r@   r   
other_rows
other_colsrowscolsLr*   jir+   r   r   r   s                rG   r   z_dia_base.multiply   s    	+##E***5>> 	)zA~~||~~-- DJ!tz//Q%+5E5Eww''...M%((E%*["J
JD$DIOA&--A9QQQU#**2>$)U+K+KLLDQa!e$t## !6777IaLLt88T\!!!T'22d:AADLD1D88A??AA4''$%:;;;ad#??4((( %++ 	+u{dj/H/H77##E***
 N4<)-dD D D 	%9 	"EJ$4Q$788y2A2&IrrM)BB""D'?$*"EEErR   c                 t   |}t          j        | j        d         t          | j        j        |j        j                            }| j        j        d         }| j        \  }}t          ||t          | j	                  || j	        | j        |
                                |
                                           |S )Nr   r#   r   )r0   r1   r&   r   r$   charr*   r   r>   r+   ravel)r@   r   rp   yr   rb   rc   s          rG   _matmul_vectorz_dia_base._matmul_vector  s    HTZ]+djo78w|+E +E F F F IOAj!1QDL))1dlDI7799aggii	) 	) 	) rR   c                 
   t          j        | j        d         |j        d         ft          j        | j        |                    }t          g | j        | j        j        | j        | j        |j        d         ||R   |S )Nr   r   r#   )r0   r1   r&   r}   r*   r   r+   )r@   r   rq   s      rG   _matmul_multivectorz_dia_base._matmul_multivector,  s    h
1u{1~6^DIu==? ? ? 	0TZ 	0$)/ 	04< 	0 	0KN	0$)	0+.	0 	0 	0 	0
rR   c                 :   t          |t                    s!t                                          |          S d| j        v s	d|j        v r-|                     | j        d         |j        d         f          S t          g | j        | j        j        | j        | j        |j        d         |j        j        |j        |j        R  \  }}|                     |	                    t          |          d          |f| j        d         |j        d         f          S )Nr   r   ru   )r.   r   r   _matmul_sparser&   r~   r   r*   r+   reshaper>   )r@   r   r+   r*   r   s       rG   r   z_dia_base._matmul_sparse3  s*   %++ 	177))%000 
??a5;..&&
1u{1~'FGGG" >DJ > >#'<>15>#(;q>>49J4D> $)=> 38*> > > ""DLLWr$B$BG#L$(JqM5;q>#BD D 	DrR   r   c                    | j         \  }}|j        dk    rt          j        }nt	          |          }|dk     rt          ||z   ||          }d}|}nt          |||z
  |          }|}||z   }|j        dk    r
|d |         }| j        j         \  }	}
|| j        v rX||
k    r9t          j        |	|f| j        j	                  }| j        |d d d |
f<   || _        || j        | j        |k    ||f<   d S t          j
        | j        | j        j	                            |                    | _        t          ||
          }t          j        |	dz   |f| j        j	                  }| j        |d dd |
f<   ||d||f<   || _        d S )Nr   r#   r   ru   )r&   r;   r0   infr>   r`   r*   r+   r1   r$   appendtyper4   )r@   valuesrd   rb   rc   values_nn	min_index	max_index	data_rows	data_colsr*   ms                rG   _setdiagz_dia_base._setdiagC  s   z1;!vHH6{{Hq55AE1h''AIIIAq1uh''AIAI;!BQBZF#y	99$$xI 6dioNNN&*iQQQ

]# 	@FDIdla'9)<<===9T\4<3E3J3J13M3MNNDLIy))A8Y]A.dioFFFD$(ID"jyj!,2DYy(()DIIIrR   c                 2    |r|                                  S | S r   r%   )r@   r%   s     rG   r-   z_dia_base.todiah  s     	99;;KrR   c                 r   ||dk    rt          d          | j        \  }}t          | j                  }| j         }t	          j        t          |          t          j                  d d d f         }t	          j        |t          j                  ||z  d d d f         z
  }t          d|| j        j        d         z
            }	t	          j	        | j        t	          j
        | j        j        d         |	f| j        j                  f          }
|
||f         }
|                     |
|f||f|          S )N)r   r   zvSparse arrays/matrices do not support an 'axes' parameter because swapping dimensions is the only logical permutation.r#   r   r   )r&   r%   )r5   r&   r4   r+   r0   rT   r>   intcr*   hstackr1   r$   r~   )r@   axesr%   rU   rV   max_dimr+   rc
pad_amountr*   s              rG   	transposez_dia_base.transposep  sM    L M M M "Z(dj// <- Ic'll"'222111d7;Ihbg...'G2CQQQW1MMGDIOA$6677
y$)RXtyq/A:.N48IO&E &E &E F G GAqDz""D'?h; &* # , , 	,rR   c                    | j         \  }}|| k    s||k    r t          j        d| j        j                  S t          j        | j        |k              \  }t          d|          }t          ||z   |          }||z
  }|j	        dk    r t          j
        || j        j                  S | j        |d         ||f         }|t          |          z
  }	|	dk    rt          j        |d|	fd          }|S )Nr   r#   constant)mode)r&   r0   emptyr*   r$   nonzeror+   r4   r`   sizer1   r>   pad)
r@   rd   r   r   idx	first_collast_colresult_sizeresultpaddings
             rG   diagonalz_dia_base.diagonal  s    Z
d::d8ATY_5555z$,!+,,1II	tax&&*8q==8Kty????3q69X#556F+Q;;VFQLzBBBFrR   c                    | j         dk    r!|                     | j        | j                  S | j        \  }}| j        j        \  }}t          j        |          }|| j        d d d f         z
  }|dk    }|||k     z  }|||k     z  }|| j        dk    z  }|                     t          | j                            }	t          j
        |dz   |	          }
t          j        |                    d          d |                   |
d|dz   <   ||k     r|
|         |
|dz   d <   |j        |j                                     |	d          }| j        j        |j                 }|                     |||
f| j        | j                  S )	Nr   r#   r!   r   rh   Fr   )r&   r$   )rL   _csc_containerr&   r$   r*   r0   rT   r+   r3   r4   r1   cumsumrk   Tr=   )r@   r%   rU   rV   num_offsets
offset_lenrW   rX   rY   rC   indptrindicesr*   s                rG   tocscz_dia_base.tocsc  s   8q==&&tz&DDD!Z("&)/Zi
++DL400qx x'(a ))TZ)AA	(Q,i888!#4888+;+;IXI+F!G!GqA~  $*:$6F:a<==!%-&&yu&==y{46"""D'6#:$*)- # 5 5 	5rR   c                 \   | j         \  }}| j        j         \  }}t          j        |          }|| j        d d d f         z
  }|dk    }|||k     z  }|||k     z  }|| j        dk    z  }||         }t          j        ||          |                                         }	|                     | j        ft          | j                             }
|	                    |
d          }|		                    |
d          }	| j        |         }| 
                    |||	ff| j         | j        d          S )Nr   )arraysr"   Fr   )r&   r$   r%   )r&   r*   r0   rT   r+   tiler   r3   r4   r=   r<   r$   )r@   r%   rU   rV   r   r   rW   rX   rY   colrC   r*   s               rG   tocooz_dia_base.tocoo  s8   !Z("&)/Zi
++DL400qx x'(a $igk;//

=))L?3tz?? * 
 
	 jjj//jjj//y ""C:dj
 # 
 
 	
rR   Tc                     |r5|                      || j                                        f| j                  S |                      || j        f| j                  S )zReturns a matrix with the same sparsity structure as self,
        but with different data.  By default the structure arrays are copied.
        rv   )r~   r+   r%   r&   )r@   r*   r%   s      rG   ry   z_dia_base._with_data  sp      	&&t|((**+4: '    &&t|$DJ '   rR   c                    t          |          }|\  }}| j        d d d |f         | _        || j        d         k    rt          j        | j        | j        d         z   | j        j        d         k               rO| j        d d d f         | j        d         z   t          j        | j        j        d                   k    }d| j        |<   || _        d S )Nr   r   )r   r*   r&   r0   anyr+   rT   r,   )r@   r&   rb   rc   rY   s        rG   resizez_dia_base.resize  s    E""1Iaaa!e$	
1t|djm3dioa6HHII  LD)DJqM9Idioa0112DDIdOrR   )NNFr   )NNN)Frg   )NF)T)__name__
__module____qualname___formatr(   rQ   rZ   r]   r   __doc__re   rk   rw   r   r   r   r   r   r   r   r-   r   r   r   r   ry   r   __classcell__)r   s   @rG   r   r      s\       GKGT KG KG KG KG KGZ
 
 
	 	 	1 1 1 1 $19M    o-GO6 6 6 6@ +%CK-N -N -N -N^1 1 1 1 12 2 2/F /F /F /F /Fb    D D D D D # # # #J    M)EM, , , ,,  )1I     '/H5 5 5 50 M)EM
 
 
 
0 M)EM      ^+FNNNNNrR   r   c                 v    t          j        |           }t          j        t          |                     || <   |S )z)Helper function to invert an index array.)r0   
zeros_likerT   r>   )r   invs     rG   r|   r|     s/    
-

CyS""CHJrR   c                 ,    t          | t                    S )a  Is `x` of dia_matrix type?

    Parameters
    ----------
    x
        object to check for being a dia matrix

    Returns
    -------
    bool
        True if `x` is a dia matrix, False otherwise

    Examples
    --------
    >>> from scipy.sparse import dia_array, dia_matrix, coo_matrix, isspmatrix_dia
    >>> isspmatrix_dia(dia_matrix([[5]]))
    True
    >>> isspmatrix_dia(dia_array([[5]]))
    False
    >>> isspmatrix_dia(coo_matrix([[5]]))
    False
    )r.   r   )rp   s    rG   r   r     s    . a$$$rR   c                       e Zd ZdZdS )r   a<  
    Sparse array with DIAgonal storage.

    This can be instantiated in several ways:
        dia_array(D)
            where D is a 2-D ndarray

        dia_array(S)
            with another sparse array or matrix S (equivalent to S.todia())

        dia_array((M, N), [dtype])
            to construct an empty array with shape (M, N),
            dtype is optional, defaulting to dtype='d'.

        dia_array((data, offsets), shape=(M, N))
            where the ``data[k,:]`` stores the diagonal entries for
            diagonal ``offsets[k]`` (See example below)

    Attributes
    ----------
    dtype : dtype
        Data type of the array
    shape : 2-tuple
        Shape of the array
    ndim : int
        Number of dimensions (this is always 2)
    nnz
    size
    data
        DIA format data array of the array
    offsets
        DIA format offset array of the array
    T

    Notes
    -----

    Sparse arrays can be used in arithmetic operations: they support
    addition, subtraction, multiplication, division, and matrix power.
    Sparse arrays with DIAgonal storage do not support slicing.

    Examples
    --------

    >>> import numpy as np
    >>> from scipy.sparse import dia_array
    >>> dia_array((3, 4), dtype=np.int8).toarray()
    array([[0, 0, 0, 0],
           [0, 0, 0, 0],
           [0, 0, 0, 0]], dtype=int8)

    >>> data = np.array([[1, 2, 3, 4]]).repeat(3, axis=0)
    >>> offsets = np.array([0, -1, 2])
    >>> dia_array((data, offsets), shape=(4, 4)).toarray()
    array([[1, 0, 3, 0],
           [1, 2, 0, 4],
           [0, 2, 3, 0],
           [0, 0, 3, 4]])

    >>> from scipy.sparse import dia_array
    >>> n = 10
    >>> ex = np.ones(n)
    >>> data = np.array([ex, 2 * ex, ex])
    >>> offsets = np.array([-1, 0, 1])
    >>> dia_array((data, offsets), shape=(n, n)).toarray()
    array([[2., 1., 0., ..., 0., 0., 0.],
           [1., 2., 1., ..., 0., 0., 0.],
           [0., 1., 2., ..., 0., 0., 0.],
           ...,
           [0., 0., 0., ..., 2., 1., 0.],
           [0., 0., 0., ..., 1., 2., 1.],
           [0., 0., 0., ..., 0., 1., 2.]])
    Nr   r   r   r   rj   rR   rG   r   r     "        H H H HrR   r   c                       e Zd ZdZdS )r   aO  
    Sparse matrix with DIAgonal storage.

    This can be instantiated in several ways:
        dia_matrix(D)
            where D is a 2-D ndarray

        dia_matrix(S)
            with another sparse array or matrix S (equivalent to S.todia())

        dia_matrix((M, N), [dtype])
            to construct an empty matrix with shape (M, N),
            dtype is optional, defaulting to dtype='d'.

        dia_matrix((data, offsets), shape=(M, N))
            where the ``data[k,:]`` stores the diagonal entries for
            diagonal ``offsets[k]`` (See example below)

    Attributes
    ----------
    dtype : dtype
        Data type of the matrix
    shape : 2-tuple
        Shape of the matrix
    ndim : int
        Number of dimensions (this is always 2)
    nnz
    size
    data
        DIA format data array of the matrix
    offsets
        DIA format offset array of the matrix
    T

    Notes
    -----

    Sparse matrices can be used in arithmetic operations: they support
    addition, subtraction, multiplication, division, and matrix power.
    Sparse matrices with DIAgonal storage do not support slicing.

    Examples
    --------

    >>> import numpy as np
    >>> from scipy.sparse import dia_matrix
    >>> dia_matrix((3, 4), dtype=np.int8).toarray()
    array([[0, 0, 0, 0],
           [0, 0, 0, 0],
           [0, 0, 0, 0]], dtype=int8)

    >>> data = np.array([[1, 2, 3, 4]]).repeat(3, axis=0)
    >>> offsets = np.array([0, -1, 2])
    >>> dia_matrix((data, offsets), shape=(4, 4)).toarray()
    array([[1, 0, 3, 0],
           [1, 2, 0, 4],
           [0, 2, 3, 0],
           [0, 0, 3, 4]])

    >>> from scipy.sparse import dia_matrix
    >>> n = 10
    >>> ex = np.ones(n)
    >>> data = np.array([ex, 2 * ex, ex])
    >>> offsets = np.array([-1, 0, 1])
    >>> dia_matrix((data, offsets), shape=(n, n)).toarray()
    array([[2., 1., 0., ..., 0., 0., 0.],
           [1., 2., 1., ..., 0., 0., 0.],
           [0., 1., 2., ..., 0., 0., 0.],
           ...,
           [0., 0., 0., ..., 2., 1., 0.],
           [0., 0., 0., ..., 1., 2., 1.],
           [0., 0., 0., ..., 0., 1., 2.]])
    Nr   rj   rR   rG   r   r   \  r   rR   r   )"r   __docformat____all__numpyr0   
_lib._utilr   _matrixr	   _baser
   r   r   r   _datar   _sputilsr   r   r   r   r   r   r   r   _sparsetoolsr   r   r   r   r|   r   r   r   rj   rR   rG   <module>r      s    %
7
7
7     ' ' ' ' ' '       7 7 7 7 7 7 7 7 7 7 7 7                          > = = = = = = = = =W, W, W, W, W, W, W, W,t  % % %6I I I I I	7 I I IXI I I I I9 I I I I IrR   