
    d                        d Z ddlmZ ddlZ ej        e          ZddlmZ ddl	m
Z
 dZe G d	 d
e
                      Z G d de          Z G d de          Z G d de          Z G d de          ZdS )z

    )annotationsN   )abstract   )	Transform)CategoricalScaleLinearScaleLogScaleScalec                  $     e Zd ZdZd fdZ xZS )r   a   Base class for ``Scale`` models that represent an invertible
    computation to be carried out on the client-side.

    JavaScript implementations should implement the following methods:

    .. code-block

        compute(x: number): number {
            # compute and return the transform of a single value
        }

        v_compute(xs: Arrayable<number>): Arrayable<number> {
            # compute and return the transform of an array of values
        }

        invert(sx: number): number {
            # compute and return the inverse transform of a single value
        }

        v_invert(sxs: Arrayable<number>): Arrayable<number> {
            # compute and return the inverse transform of an array of values
        }

    returnNonec                :     t                      j        |i | d S Nsuper__init__selfargskwargs	__class__s      3lib/python3.11/site-packages/bokeh/models/scales.pyr   zScale.__init__F   %    $)&)))))    r   r   __name__
__module____qualname____doc__r   __classcell__r   s   @r   r   r   *   sG         4* * * * * * * * * *r   r   c                  $     e Zd ZdZd fdZ xZS )ContinuousScalezB Represent a scale transformation between continuous ranges.

    r   r   c                :     t                      j        |i | d S r   r   r   s      r   r   zContinuousScale.__init__P   r   r   r   r   r#   s   @r   r%   r%   J   G         
* * * * * * * * * *r   r%   c                  $     e Zd ZdZd fdZ xZS )r	   zI Represent a linear scale transformation between continuous ranges.

    r   r   c                :     t                      j        |i | d S r   r   r   s      r   r   zLinearScale.__init__Z   r   r   r   r   r#   s   @r   r	   r	   T   r'   r   r	   c                  $     e Zd ZdZd fdZ xZS )r
   zF Represent a log scale transformation between continuous ranges.

    r   r   c                :     t                      j        |i | d S r   r   r   s      r   r   zLogScale.__init__c   r   r   r   r   r#   s   @r   r
   r
   ]   r'   r   r
   c                  $     e Zd ZdZd fdZ xZS )r   zk Represent a scale transformation between a categorical source range and
    continuous target range.

    r   r   c                :     t                      j        |i | d S r   r   r   s      r   r   zCategoricalScale.__init__m   r   r   r   r   r#   s   @r   r   r   f   sG         * * * * * * * * * *r   r   )r!   
__future__r   logging	getLoggerr   logcore.has_propsr   
transformsr   __all__r   r%   r	   r
   r    r   r   <module>r6      sS    # " " " " " g!! & % % % % % ! ! ! ! ! ! 
* * * * *I * * 
*>* * * * *e * * ** * * * */ * * ** * * * * * * ** * * * *u * * * * *r   