





'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCAmelCase					:		Dict		=							{'configuration_xlnet': ['XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP', 'XLNetConfig']}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase					:		List[Any]		=							['XLNetTokenizer']

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase					:		int		=							['XLNetTokenizerFast']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase					:		List[Any]		=							[
       'XLNET_PRETRAINED_MODEL_ARCHIVE_LIST',
       'XLNetForMultipleChoice',
       'XLNetForQuestionAnswering',
       'XLNetForQuestionAnsweringSimple',
       'XLNetForSequenceClassification',
       'XLNetForTokenClassification',
       'XLNetLMHeadModel',
       'XLNetModel',
       'XLNetPreTrainedModel',
       'load_tf_weights_in_xlnet',
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase					:		Dict		=							[
       'TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST',
       'TFXLNetForMultipleChoice',
       'TFXLNetForQuestionAnsweringSimple',
       'TFXLNetForSequenceClassification',
       'TFXLNetForTokenClassification',
       'TFXLNetLMHeadModel',
       'TFXLNetMainLayer',
       'TFXLNetModel',
       'TFXLNetPreTrainedModel',
   ]


if TYPE_CHECKING:
   from .configuration_xlnet import XLNET_PRETRAINED_CONFIG_ARCHIVE_MAP, XLNetConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_xlnet import XLNetTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_xlnet_fast import XLNetTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_xlnet import (
          XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
          XLNetForMultipleChoice,
          XLNetForQuestionAnswering,
          XLNetForQuestionAnsweringSimple,
          XLNetForSequenceClassification,
          XLNetForTokenClassification,
          XLNetLMHeadModel,
          XLNetModel,
          XLNetPreTrainedModel,
          load_tf_weights_in_xlnet,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_xlnet import (
          TF_XLNET_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFXLNetForMultipleChoice,
          TFXLNetForQuestionAnsweringSimple,
          TFXLNetForSequenceClassification,
          TFXLNetForTokenClassification,
          TFXLNetLMHeadModel,
          TFXLNetMainLayer,
          TFXLNetModel,
          TFXLNetPreTrainedModel,
      )

else:
   import sys

   UpperCAmelCase					:		int		=							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)









'''simple docstring'''

UpperCAmelCase					:		Union[str, Any]		=							tuple[float, float, float]
UpperCAmelCase					:		int		=							tuple[float, float, float]




def    _a    (							lowerCAmelCase_			,      lowerCAmelCase_	):





      """simple docstring"""



      _snake_case		:	str					     =     end_pointa[0] - end_pointa[0]
      _snake_case		:	Tuple					     =     end_pointa[1] - end_pointa[1]
      _snake_case		:	Any					     =     end_pointa[2] - end_pointa[2]
      return (x, y, z)




def    _a    (							lowerCAmelCase_			,      lowerCAmelCase_	):





      """simple docstring"""



      _snake_case		:	Dict					     =     ab[1] * ac[2] - ab[2] * ac[1]  # *i
      _snake_case		:	List[str]					     =     (ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
      _snake_case		:	Optional[int]					     =     ab[0] * ac[1] - ab[1] * ac[0]  # *k
      return (x, y, z)




def    _a    (							lowerCAmelCase_			,      lowerCAmelCase_	):





      """simple docstring"""



      return tuple(round(lowerCAmelCase_			,      lowerCAmelCase_	) for x in vector	) == (0, 0, 0)




def    _a    (							lowerCAmelCase_			,      lowerCAmelCase_			,      lowerCAmelCase_			,      lowerCAmelCase_ = 10	):





      """simple docstring"""



      _snake_case		:	str					     =     create_vector(lowerCAmelCase_			,      lowerCAmelCase_	)
      _snake_case		:	Tuple					     =     create_vector(lowerCAmelCase_			,      lowerCAmelCase_	)
      return is_zero_vector(get_ad_vectors_cross(lowerCAmelCase_			,      lowerCAmelCase_	)			,      lowerCAmelCase_	)


