
    ՗i}                         d Z ddlZddlZddlZddlZddlmZ ddlm	Z	m
Z
mZmZmZmZ  ej                  e      Z	 ddlZdZ G d d      Zy# e$ r dZY w xY w)	z'Co-location pattern mining core module.    N)defaultdict)DictListSetTupleAnyOptionalTFc                   <   e Zd ZdZd'dededefdZdedee	ee
f      fdZde	eef   fdZd	 Zd
e	de	defdZde	eeee      f   fdZdee   de	eeee      f   defdZdededefdZde	eeee      f   de	eeee      f   fdZ	 	 	 d(dedededee	ee
f      fdZdeee      defdZdee   dee   dee   deee      def
dZdee   de	eeee      f   fd Zdee   dee   dedeee      def
d!Z	 	 d)d"ee	ee
f      d#ed$edee	ee
f      fd%Zy&)*CoLocationMinerz4Co-location pattern miner using participation index.	data_pathdistance_thresholduse_gpuc                    || _         | j                  |      | _        | j                         | _        i | _        | j                  D ]  }|d    |d    }|| j
                  |<    |xr t        | _        | j                  r\t        j                  j                         r>d| _        t        j                  dt        j                  j                  d       d       n<d| _        |rt        st        j                  d       n|rt        j                  d	       d
| _        | j#                          t        j                  dt%        | j                         dt%        | j                         d       y
)a  Initialize miner with data.
        
        Args:
            data_path: Path to JSON data file
            distance_threshold: Distance threshold for neighbor relationship
            use_gpu: Whether to use GPU for distance calculations (if available)
        typeidcudaz5GPU acceleration enabled for pattern mining (device: r   )cpuz0PyTorch not available, GPU acceleration disabledzCUDA not available, using CPUNzLoaded z instances with z	 features)r   
_load_datadata_count_featuresfeature_counts_instance_mapTORCH_AVAILABLEr   torchr   is_availabledeviceloggerinfoget_device_namewarning_coords_build_coords_arraylen)selfr   r   r   iteminst_strs         A   /home/ubuntu/codebase/yexijia/保研/colocation_mvp/core/miner.py__init__zCoLocationMiner.__init__   s/    #5OOI.	"224IIDv,T
|4H+/Dx( 
 2?<<EJJ335 DKKKOPUPZPZPjPjklPmOnnopqDKQR>?   "gc$))n--=c$BUBU>V=WW`ab    returnc                     t        |dd      5 }t        j                  |      }ddd       D ]  }d|vs	d|vsd|vst        d|        |S # 1 sw Y   ,xY w)	zLoad data from JSON file.
        
        Args:
            data_path: Path to data file
            
        Returns:
            List of data instances
        rzutf-8)encodingNr   xyzInvalid data format: )openjsonload
ValueError)r%   r   fr   r&   s        r(   r   zCoLocationMiner._load_data:   sg     )S73q99Q<D 4 DT!S_4 #8!?@@   43s   AAc                 x    t        t              }| j                  D ]  }||d   xx   dz  cc<    t        |      S )z~Count instances for each feature type.
        
        Returns:
            Dictionary mapping feature type to count
        r      )r   intr   dict)r%   countsr&   s      r(   r   zCoLocationMiner._count_featuresM   s:     S!IID4< A%  F|r*   c                    t        | j                        }t        j                  |dft        j                        | _        t        | j                        D ]-  \  }}|d   | j
                  |df<   |d   | j
                  |df<   / | j                  rGt        r@t        j                  | j                  t        j                  | j                        | _        yyy)	z7Build coordinate arrays for batch distance calculation.   dtyper/   r   r0   r7   )r>   r   N)r$   r   npzerosfloat32r"   	enumerater   r   r   tensorr   r   _distance_threshold_gpu)r%   nir&   s       r(   r#   z#CoLocationMiner._build_coords_arrayX   s    		NxxAbjj9 +GAt!%cDLLA!%cDLLA ,
 <<O+0<<8O8OW\WdWdmqmxmx+yD( ,<r*   	instance1	instance2c                     t        j                  |d   |d   z
  dz  |d   |d   z
  dz  z         }|| j                  k  S )zCheck if two instances are neighbors.
        
        Args:
            instance1: First instance
            instance2: Second instance
            
        Returns:
            True if instances are neighbors
        r/   r<   r0   )mathsqrtr   )r%   rG   rH   distances       r(   _is_neighborzCoLocationMiner._is_neighbord   sT     99s^in,2s^in,23
 42222r*   c           
         ddl }|j                         }t        j                  d       t        t              }t        | j                        }t        t              }t        | j                        D ]  \  }}||d      j                  |        t        j                  dt        |       d       t        |j                               }g }	t        t        |            D ]8  }t        |dz   t        |            D ]  }
|	j                  ||   ||
   f        : t        j                  dt        |	       d	       d}|	D ]  \  }}||   }||   }|r|s| j                  |   }| j                  |   }| j                  rt        rt        j                   |      j#                  | j$                        }t        j                   |      j#                  | j$                        }|j'                  d      |j'                  d      z
  }t        j(                  t        j*                  |d
z  d
            }|| j,                  k  }t        j.                  |d      j1                         j3                         }n|ddt4        j6                  ddf   |t4        j6                  ddddf   z
  }t5        j(                  t5        j*                  |d
z  d
            }|| j8                  k  }t5        j:                  t5        j<                  |            }t        ||g      }|d    d|d    }|D ]}  \  }}||   }||   }| j                  |   }| j                  |   }|d   |d   k(  r|d    |d    |d    |d    g} n|d    |d    |d    |d    g} ||   j                  |         |dz  }|dz  dk(  sy|j                         |z
  }!t        j                  d| dt        |	       d|!dd        |j                         |z
  }!t+        d |j?                         D              }"t        j                  dt        |       d|" d|!dd       tA        |      S )ap  Create 2-order table instances using optimized batch computation.
        
        Uses spatial indexing and batch distance calculation for performance.
        Merges patterns with same features but different order (e.g., "a,b" and "b,a").
        
        Returns:
            Dictionary mapping pattern to table instances (pattern is sorted alphabetically)
        r   NzCStarting 2-order table instance creation with batch optimization...r   zGrouped instances by type: z typesr7   zProcessing z type pairs...r<   dimF)as_tupleaxis,r   
   
Processed /z type pairs (.1f
s elapsed)c              3   2   K   | ]  }t        |        y wNr$   .0vs     r(   	<genexpr>z<CoLocationMiner._create_table_instances_2.<locals>.<genexpr>   s     G.Fc!f.F   Created ! candidate 2-order patterns with z total instances in .2fs)!timer   r   r   listr$   r   rB   appendsortedkeysranger"   r   r   r   
from_numpytor   	unsqueezerK   sumrD   nonzeror   numpyr?   newaxisr   column_stackwherevaluesr9   )#r%   rf   
start_timetable_instancesrE   type_indicesrF   r&   types
type_pairsjprocessed_pairstype1type2indices1indices2coords1coords2coords1_gpucoords2_gpudiff	distancesneighbor_maskneighbor_indicespattern_typespatternidx1_posidx2_posi1i2inst1inst2instanceelapsedtotal_instancess#                                      r(   _create_table_instances_2z)CoLocationMiner._create_table_instances_2t   sN    	YY[
YZ%d+		N #4( +GAtf&--a0 , 	1#l2C1DFKL |((*+
s5z"A1q5#e*-!!58U1X"67 . # 	k#j/!2.AB &LE5#E*H#E*H8 ll8,Gll8,G||#..w7::4;;G#..w7::4;;G #,,Q/+2G2G2JJ!JJuyy'BC	 !*T-I-I I#(==#O#S#S#U#[#[#]  q"**a/072::q!;K3LLGGBFF4191$=>	 !*T-D-D D#%??288M3J#K  #E5>2M&q)*!M!,<+=>G '7"(h'h'		"		" =M!$44#(=/%+ ?E&M?SXY]S^R_A`aH#(=/%+ ?E&M?SXY]S^R_A`aH(//9 '7 q O#q())+
2j(93z?:K=Y`adXeeopqq 't ))+
*Go.D.D.FGGhs?344UVeUffz  |C  DG  {H  HI  J  	KO$$r*   r   rw   c                    |syi }|D ]  }t               }|j                         D ]J  \  }}||j                  d      v s|D ],  }|D ]%  }	|	j                  |      s|j	                  |	       ' . L | j
                  j                  |d      }
|
dkD  rt        |      |
z  nd||<    |rt        |j                               S dS )a7  Calculate participation index for a pattern.
        
        Args:
            pattern: Set of feature types in the pattern
            table_instances: Table instances for the pattern (key is pattern_str, value is list of instances)
            
        Returns:
            Participation index value
                rT   r7   r   )
setitemssplit
startswithaddr   getr$   minru   )r%   r   rw   participation_ratesfeatureparticipating_instancespattern_str	instancesr   r'   r   s              r(   _calculate_participation_indexz.CoLocationMiner._calculate_participation_index   s      !G '*e# +:*?*?*A&Yk//44$-(0H'227; 7 ; ;H E )1 %.	 +B #1155gqAO]lop]p3/F+G/+Yvy(' , 5Hs&--/0PSPr*   	inst1_str	inst2_strc                     | j                   j                  |      }| j                   j                  |      }||y| j                  ||      S )aQ  Check if two instances are neighbors by directly calculating distance.
        
        Args:
            inst1_str: First instance string (e.g., "Restaurant1")
            inst2_str: Second instance string (e.g., "Cafe2")
            
        Returns:
            True if the two instances are neighbors (distance <= threshold)
        F)r   r   rM   )r%   r   r   r   r   s        r(   _are_instances_neighborsz(CoLocationMiner._are_instances_neighbors   sQ     ""&&y1""&&y1=EM   ..r*   k_minus_1_patternsc                    $% ddl }|j                         }t        j                  dt        |       d       t	        t
              $t        |j                               }t	        t
              %|D ]L  }|j                  d      }t        |      dkD  s#dj                  |dd       }%|   j                  ||f       N t        j                  dt        %       d	       d}t        %fd
%D              }	t        j                  d|	        d}
g }d}d}$ fd}%j                         D ]V  \  }}t        |      dk  rt        t        |      dz
        D ]&  }||   \  }}||   }t        |dz   t        |            D ]  }||   \  }}|d   |d   k7  sdj                  ||d   gz         }||   }d}t        |      t        |      z  |kD  r}ddl}t        t!        j"                  |            }t        |      |kD  r|j%                  ||      }t        |      |kD  r|j%                  ||      }t        j'                  d| d|        t	        t
              }|D ]3  }t        |      dkD  st)        |dd       }||   j                  |       5 |D ]  }t        |      dkD  st)        |dd       }||v s%||   D ]p  }|d   }|d   } |j                  ||||| d       t        |      |
k\  s3|j                         }! ||       ||j                         |!z
  z  }|t        |      z  }g }r  |dz  }|dz  dk(  s|j                         |z
  }"t        j                  d| d|	 d| d|"dd	        ) Y |r<|j                         }! ||       ||j                         |!z
  z  }|t        |      z  }|j                         |z
  }"t        d $j+                         D              }#t        j                  d| d|dd       t        j                  dt        $       d |# d!|"dd"|dd#	       t-        $      S )$zGenerate k-order patterns from (k-1)-order patterns using optimized batch computation.
        
        Args:
            k_minus_1_patterns: (k-1)-order table instances
            
        Returns:
            k-order table instances
        r   Nz!Generating k-order patterns from z (k-1)-order patterns...rT   r7   zBuilt prefix index with z	 prefixesc              3   d   K   | ]'  }t        |         t        |         d z
  z  dz   ) yw)r7   r<   Nr\   )r^   pprefix_indexs     r(   r`   z=CoLocationMiner._generate_k_order_patterns.<locals>.<genexpr>-  s6     gZfUV#l1o.#l1o2F2JKqPZfs   -0z Total pattern pairs to process: i c                    | sy| D cg c]  }|d   	 }}| D cg c]  }|d   	 }}|D cg c]  }j                   j                  |       }}|D cg c]  }j                   j                  |       }}j                  rTt        rMt	        |       dkD  r>t        j                  |D cg c]  }|r
|d   |d   gnddg c}t
        j                        }t        j                  |D cg c]  }|r
|d   |d   gnddg c}t
        j                        }	t        j                  |      j                  j                        }
t        j                  |	      j                  j                        }|
|z
  }t        j                  t        j                  |d	z  d
            }|j                  k  }|j                         j!                         }nt        j                  |D cg c]  }|r
|d   |d   gnddg c}t
        j                        }t        j                  |D cg c]  }|r
|d   |d   gnddg c}t
        j                        }	||	z
  }t        j                  t        j                  |d	z  d
            }|j"                  k  }t%        | |      D ].  \  }}|s	|d   |d   d   gz   }|d      j'                  |       0 yc c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w )u   处理一批邻近关系检查Nlast1last2i  r/   r0   r   r=   r<   r7   rO   rR   r   r   r   r   )r   r   r   r   r$   r?   arrayrA   r   rl   rm   r   rK   ro   rD   r   rq   r   ziprh   )batch_checkscheck
last1_strs
last2_strsre   
inst1_objs
inst2_objsobjr   r   r   r   r   r   r   neighbor_resultsis_neighbornew_instance
k_patternsr%   s                     r(   process_batchzACoLocationMiner._generate_k_order_patterns.<locals>.process_batch6  s    7CClU%.lJC6BClU%.lJC >HHZ$,,003ZJH=GHZ$,,003ZJH ||C4E4L((Wa#bWaPSCSXs3x$8aV$KWa#bjljtjtu((Wa#bWaPSCSXs3x$8aV$KWa#bjljtjtu#..w7::4;;G#..w7::4;;G"[0!JJuyy'BC	 )T-I-I I#0#4#4#6#<#<#>  ((Wa#bWaPSCSXs3x$8aV$KWa#bjljtjtu((Wa#bWaPSCSXs3x$8aV$KWa#bjljtjtu(GGBFF4191$=>	#,0G0G#G  '*,8H&I"{#(>U7^B5G4H#HLuY/077E 'J= DC IH
 $c#b $c#bs-   KK "K%"K*/K/0K4-K9.K>r<   iP  z%Sampling instances for pattern pair: z x )r   r   r   r   r   2   rV   rW   z pattern pairs, checked z neighbors (rX   rY   c              3   2   K   | ]  }t        |        y wr[   r\   r]   s     r(   r`   z=CoLocationMiner._generate_k_order_patterns.<locals>.<genexpr>  s     B.Ac!f.Ara   zTotal neighbor checks: z, batch check time: rd   re   
Generated z k-order patterns with z instances in zs (batch check: zs))rf   r   r   r$   r   rg   ri   rj   r   joinrh   ro   r   rk   randomr8   r?   rK   sampledebugtupleru   r9   )&r%   r   rf   rv   pattern_keyspattern_keypattern_listprefixr|   total_pairs
batch_sizecurrent_batchtotal_checksbatch_check_timer   rF   pattern1_keypattern1_list
inst1_listr{   pattern2_keypattern2_listnew_pattern
inst2_listmax_instances_per_pairr   sample_sizeinst1_prefix_mapr   inst_prefixr   last_inst1_strlast_inst2_strbatch_startr   r   r   r   s&   `                                   @@r(   _generate_k_order_patternsz*CoLocationMiner._generate_k_order_patterns  s    	YY[
7<N8O7PPhij &
05578 #4('K&,,S1L< 1$,s"34V$++[,,GH	 ( 	.s</@.AKLgZfgg6{mDE 
'	FT %1$6$6$8 FL< 1$ 3|,q01.:1o+m/=
q1uc,&78A2>q//L- %R(M",==&)hh}b@Q?R/R&S%7%E
 27.z?S_<?UU)*-bgg6L.M*NK":<-3]]:{-S
":<-3]]:{-S
"LL+PQ]P^^abnao)pq ,7t+<(%/E"5zA~.3E#2J.? 0 = D DU K &0 &0E"5zA~.3E#2J.?#.2B#B1A+1N9>r9>r(5(<(<7B5:5:5C5C>* )+ ,/}+=+K:>))+K,9-,H,<		k@Y,Y,<,8C<N,NL<>M% 2O &02 (1,*R/14&*iikJ&>G"KK*_4EQ{mSklxky  zF  GN  OR  FS  S]  )^  _u 9	 2 %9L ))+K-(		k 99C..L))+
*Bj.?.?.ABB-l^;OP`adOeefghjZ 11HHYYghopsgt  uE  FV  WZ  E[  []  ^  	_Jr*   
confidencemin_participationmax_pattern_sizepriorityc                    t         j                  d| d|        g }| j                         }t         j                  dt        |       dt	        d |j                         D               d       d}||k  rY|rVt         j                  d| d	t        |       d
       i }g }|j                         D ]  \  }	}
t        |	j                  d            }| j                  ||	|
i      }|j                  |	|t        |
      f       ||k\  sW|
||	<   |}|j                  t        |      |	|||t        |
      |
|
dd d        |rf|j                  d d       t         j                  d| d       |dd D ]1  \  }	}}||k\  rdnd}t         j                  d| d|	 d|dd|        3 ||k  r| j                  |      }|dz  }nn	||k  r|rV|dk(  r|j                  d d       n3|dk(  r|j                  d d       n|d k(  r|j                  d! d       t         j                  d"t        |       d#       |S )$aY  Mine co-location patterns.
        
        Args:
            min_participation: Minimum participation index threshold
            max_pattern_size: Maximum pattern size
            priority: Priority for sorting ("confidence", "participation", "size")
            
        Returns:
            List of discovered patterns with metadata
        z'Mining patterns with min_participation=z, max_pattern_size=rb   rc   c              3   2   K   | ]  }t        |        y wr[   r\   r]   s     r(   r`   z0CoLocationMiner.mine_patterns.<locals>.<genexpr>  s'       [F  lEfg[^_`[a  lEra   z total instancesr<   zMining z-order patterns, found z candidatesrT   N   )r   r   sizeparticipation_indexr   instance_countrw   table_instances_samplec                     | d   S )Nr7    r/   s    r(   <lambda>z/CoLocationMiner.mine_patterns.<locals>.<lambda>  s    qtr*   Tkeyreversez+Top 5 patterns by participation (threshold=z):u   ✓u   ✗z   z: participation=z.4fz, instances=r7   r   c                     | d   S Nr   r   r   s    r(   r   z/CoLocationMiner.mine_patterns.<locals>.<lambda>  s    AlOr*   participationc                     | d   S )Nr   r   r   s    r(   r   z/CoLocationMiner.mine_patterns.<locals>.<lambda>  s
    A.C,Dr*   r   c                     | d   S )Nr   r   r   s    r(   r   z/CoLocationMiner.mine_patterns.<locals>.<lambda>  s    AfIr*   zFound z valid patterns)r   r   r   r$   ro   ru   r   r   r   r   rh   ri   sortr   )r%   r   r   r   all_patternscurrent_patternskvalid_patternsparticipation_statsr   r   pattern_setr   r   countstatuss                   r(   mine_patternszCoLocationMiner.mine_patterns  s    	=>O=P Q''7&8: 	; 99;hs#3455VWZ  [Fk{  lC  lC  lE  [F  XF  WG  GW  X  	Y ##(8KK'!$;C@P<Q;RR]^_  N"$*:*@*@*B&Y!+"3"3C"89 $ C CKR]_hQi j#**KI+WX $552;N;/ "/J ''#)+#6'2 !/<&0*-i.+42;BQ-	) 	 +C. ##((^T(JIJ[I\\^_`9LRa9P5K&37H&HUeFKK"VHAk]:J=Y\J]]ijoip qr :Q
 ###'#B#B>#R QS ##(8X |#";TJ("DdS"5tDfS./?@r*   pattern_table_instancesc                     |syt        |      }t        | j                        t        | j                        dz
  z  dz  }|dkD  r||z  S dS )a  Calculate support for a pattern.
        
        Support = number of table instances / total possible neighbor pairs
        
        Args:
            pattern_table_instances: Table instances for the pattern
            
        Returns:
            Support value (0.0 to 1.0)
        r   r7   r<   r   )r$   r   )r%   r  r   r   s       r(   _calculate_supportz"CoLocationMiner._calculate_support  sS     ' 56 $))nDII(:;a?0;a,HSHr*   
antecedent
consequentc                      |syt               }|D ]3  }|D ],  }|D ]%  }|j                  |      s|j                  |       ' . 5 t         fd|D              }	|	dk(  ryt	        |      |	z  }
t        |
d      S )uj  Calculate confidence for a rule: antecedent → consequent.
        
        For co-location rules, confidence = P(consequent near antecedent | antecedent exists)
        = |instances where antecedent and consequent co-occur| / |instances of antecedent|
        
        Args:
            antecedent: Left side of the rule (条件)
            consequent: Right side of the rule (结果)
            pattern: Full pattern containing both antecedent and consequent
            pattern_table_instances: Table instances for the full pattern
            
        Returns:
            Confidence value (0.0 to 1.0)
        r   c              3   V   K   | ]   }j                   j                  |d        " ywr   Nr   r   r^   r5   r%   s     r(   r`   z=CoLocationMiner._calculate_rule_confidence.<locals>.<genexpr>3  %     Qjt2266q!<j   &)r         ?)r   r   r   ro   r$   r   )r%   r  r  r   r  antecedent_instances_in_patternr   r'   r   antecedent_totalr   s   `          r(   _calculate_rule_confidencez*CoLocationMiner._calculate_rule_confidence  s      ' +.%'/H$)G**737;;HE  * % 0 QjQQq  89<LL
:s##r*   c                     t        |      dk(  ri S t        |      dk(  r7dj                  t        |            }| j                         }||v r|||   iS i S i S )zGet table instances for a given pattern.
        
        Args:
            pattern: Set of feature types
            
        Returns:
            Dictionary mapping pattern string to table instances
        r7   r<   rT   )r$   r   ri   r   )r%   r   r   all_2_orders       r(   _get_pattern_table_instancesz,CoLocationMiner._get_pattern_table_instances=  sg     w<1I w<1((6'?3K88:Kk)#[%=>>I 	r*   c                      t         fd|D              }t         j                        }|dk(  s|dk(  ry||z  }|dk(  ry||z  }|S )a  Calculate lift for a rule.
        
        Lift = confidence / P(consequent) = P(consequent | antecedent) / P(consequent)
        
        For co-location, P(consequent) = |consequent instances| / |total instances|
        
        Args:
            antecedent: Left side of the rule
            consequent: Right side of the rule
            confidence: Confidence of the rule
            pattern_table_instances: Table instances for the full pattern
            
        Returns:
            Lift value
        c              3   V   K   | ]   }j                   j                  |d        " ywr  r	  r
  s     r(   r`   z2CoLocationMiner._calculate_lift.<locals>.<genexpr>i  r  r  r   r   )ro   r$   r   )	r%   r  r  r   r  consequent_totalr   consequent_problifts	   `        r(   _calculate_liftzCoLocationMiner._calculate_liftV  s\    & QjQQdii.a#3q#8*_<a O+r*   patternsmin_confidencemin_liftc                    t         j                  dt        |       d| d|        g }|D ]i  }t        |d         }|d   }|j	                  dg       }|st         j                  d| d       E| j                  |      }	t        t        |            }
d	d
l	m
} t        dt        |            D ]  } ||
|      D ]  }t        |      }||z
  }|s| j                  ||||      }||k  r0| j                  ||||      }||k  rJt        t        |            t        t        |            t        t        |             dt        t        |             ||	|t        t        |            |j	                  dd      d}|j                  |         l |j                  d d       t         j                  dt        |       d       |S )a3  Generate association rules from mined patterns.
        
        Args:
            patterns: List of mined patterns
            min_confidence: Minimum confidence threshold
            min_lift: Minimum lift threshold
            
        Returns:
            List of association rules with metrics
        zGenerating rules from z patterns with min_confidence=z, min_lift=r   r   rw   zSkipping pattern z: no table instancesr   )combinationsr7   u    → r   r   )r  r  rule_strr   supportr  r   pattern_participationc                     | d   S r   r   r   s    r(   r   z0CoLocationMiner.generate_rules.<locals>.<lambda>  s    Q|_r*   Tr   r   z rules)r   r   r$   r   r   r   r  ri   rg   	itertoolsr  rk   r  r  rh   r   )r%   r  r  r  	all_rulespattern_datar   r   rw   pattern_supportr   r  r-   antecedent_tupler  r  r   r  rules                      r(   generate_ruleszCoLocationMiner.generate_rulesy  s    	,S]O;YZhYiitu}t~  	A	 %L,y12G&}5K*../@"EO #0=QRS #55oFO "$w-0L /1c'l+(4\1(E$!$%5!6J!(:!5J%  "&!@!@"J"J "N2   //
J
TcdDh  '-T*-=&>&,T*-=&>'-d:.>'?&@fTR\M]F^E_$`&0#2 $#)$w-#81=1A1ABWY\1]	D $$T*C )F ,/ %z 	4dCjY 078r*   N)g      0@F)g333333?r   r   )g      ?r  )__name__
__module____qualname____doc__strfloatboolr)   r   r   r   r   r8   r   r#   rM   r   r   r   r   r   r   r  r  r  r  r)  r   r*   r(   r   r      s   >!c# !c5 !cRV !cFC Dc3h,@ &	c3h 	
z3d 3t 3 3 `%4T$s)_0D+E `%D&Qc#h &Q8<S$tCy/=Q8R&QW\&QP/# /# /$ /(_ T#tDQTIBV=W _ \`adfjkopsktfuau\v _ B 8;-.%1Ju J'*J"J6:4S>6JJXI$tCy/ Ie I.%$SX %$3s8 %$,/H%$OSTXY\T]%$ch%$NCH c4PTUXPY?FZA[ 2!#c( !C !#(!CGS	?!W\!H /2(+RtDcN'; R&+R %R04T#s(^0DRr*   r   )r-  r2   loggingrJ   rq   r?   collectionsr   typingr   r   r   r   r   r	   	getLoggerr*  r   r   r   ImportErrorr   r   r*   r(   <module>r6     s^    -     # 8 8			8	$O
w
 w
	  Os   A AA