kececinumbers 0.5.1__tar.gz → 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kececinumbers
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets
5
5
  Home-page: https://github.com/WhiteSymmetry/kececinumbers
6
6
  Author: Mehmet Keçeci
@@ -59,7 +59,7 @@ Dynamic: maintainer
59
59
  Dynamic: maintainer-email
60
60
  Dynamic: requires-python
61
61
 
62
- # Keçeci Numbers: Keçeci Sayıları
62
+ # Keçeci Numbers: Keçeci Sayıları (Keçeci Conjecture)
63
63
  ---
64
64
 
65
65
  [![PyPI version](https://badge.fury.io/py/kececinumbers.svg)](https://badge.fury.io/py/kececinumbers/)
@@ -1,4 +1,4 @@
1
- # Keçeci Numbers: Keçeci Sayıları
1
+ # Keçeci Numbers: Keçeci Sayıları (Keçeci Conjecture)
2
2
  ---
3
3
 
4
4
  [![PyPI version](https://badge.fury.io/py/kececinumbers.svg)](https://badge.fury.io/py/kececinumbers/)
@@ -22,7 +22,7 @@ import warnings
22
22
  # importlib.reload(kececinumbers) # F821 undefined name 'kececinumbers'
23
23
 
24
24
  # Paket sürüm numarası
25
- __version__ = "0.5.1"
25
+ __version__ = "0.5.3"
26
26
  __author__ = "Mehmet Keçeci"
27
27
  __email__ = "mkececi@yaani.com"
28
28
 
@@ -40,6 +40,7 @@ __all__ = [
40
40
  'get_interactive',
41
41
  'get_random_type',
42
42
  '_get_integer_representation',
43
+ '_parse_quaternion_from_csv',
43
44
  'generate_kececi_vectorial',
44
45
 
45
46
  # --- Core Generation and Analysis ---
@@ -86,6 +87,7 @@ try:
86
87
  get_interactive,
87
88
  get_random_type,
88
89
  _get_integer_representation,
90
+ _parse_quaternion_from_csv,
89
91
  generate_kececi_vectorial,
90
92
  unified_generator,
91
93
  is_prime,
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # _version.py
3
3
 
4
- __version__ = "0.5.1"
4
+ __version__ = "0.5.3"
5
5
  __license__ = "MIT"
6
6
  __description__ = "Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets."
7
7
  __author__ = "Mehmet Keçeci"
@@ -533,12 +533,27 @@ def generate_kececi_vectorial(q0_str, c_str, u_str, iterations):
533
533
 
534
534
  return trajectory, prime_events
535
535
 
536
+ def _parse_quaternion_from_csv(s: str) -> np.quaternion:
537
+ """Parses a comma-separated string 'w,x,y,z' into a quaternion."""
538
+ try:
539
+ parts = [float(p.strip()) for p in s.split(',')]
540
+ if len(parts) != 4:
541
+ raise ValueError("Girdi 4 bileşen içermelidir.")
542
+ # *parts -> (parts[0], parts[1], parts[2], parts[3])
543
+ return np.quaternion(*parts)
544
+ except (ValueError, IndexError) as e:
545
+ raise ValueError(f"Geçersiz virgülle ayrılmış kuaterniyon formatı: '{s}'.") from e
546
+
536
547
  # ==============================================================================
537
548
  # --- CORE GENERATOR ---
538
549
  # ==============================================================================
539
550
 
540
- def unified_generator(kececi_type: int, start_input_raw: str, add_input_base_scalar: float, iterations: int) -> List[Any]:
541
- """Core engine to generate Keçeci Number sequences."""
551
+ def unified_generator(kececi_type: int, start_input_raw: str, add_input_raw: str, iterations: int) -> List[Any]:
552
+ """
553
+ Core engine to generate Keçeci Number sequences.
554
+ Bu güncellenmiş versiyon, tüm sayı tipleri için esnek girdi işleme ve
555
+ kuaterniyonlar için tam vektörel toplama desteği sunar.
556
+ """
542
557
 
543
558
  if not (TYPE_POSITIVE_REAL <= kececi_type <= TYPE_NEUTROSOPHIC_BICOMPLEX):
544
559
  raise ValueError(f"Invalid Keçeci Number Type: {kececi_type}. Must be between {TYPE_POSITIVE_REAL} and {TYPE_NEUTROSOPHIC_BICOMPLEX}.")
@@ -549,62 +564,82 @@ def unified_generator(kececi_type: int, start_input_raw: str, add_input_base_sca
549
564
  use_integer_division = False
550
565
 
551
566
  try:
552
- a_float = float(add_input_base_scalar)
567
+ # DEĞİŞİKLİK 1: Fonksiyonun başındaki genel `float()` dönüştürmesi kaldırıldı.
568
+ # Artık her sayı tipi, kendi `elif` bloğu içinde kendi girdisini işleyecek.
553
569
 
554
570
  if kececi_type in [TYPE_POSITIVE_REAL, TYPE_NEGATIVE_REAL]:
555
571
  current_value = int(float(start_input_raw))
556
- add_value_typed = int(a_float)
572
+ add_value_typed = int(float(add_input_raw)) # Girdi işleme bu bloğun içine taşındı
557
573
  ask_unit = 1
558
574
  use_integer_division = True
575
+
559
576
  elif kececi_type == TYPE_FLOAT:
560
577
  current_value = float(start_input_raw)
561
- add_value_typed = a_float
578
+ add_value_typed = float(add_input_raw) # Girdi işleme bu bloğun içine taşındı
562
579
  ask_unit = 1.0
580
+
563
581
  elif kececi_type == TYPE_RATIONAL:
564
582
  current_value = Fraction(start_input_raw)
565
- add_value_typed = Fraction(add_input_base_scalar)
583
+ add_value_typed = Fraction(add_input_raw) # Girdi işleme bu bloğun içine taşındı
566
584
  ask_unit = Fraction(1)
585
+
567
586
  elif kececi_type == TYPE_COMPLEX:
568
587
  current_value = _parse_complex(start_input_raw)
588
+ a_float = float(add_input_raw) # Girdi işleme bu bloğun içine taşındı
569
589
  add_value_typed = complex(a_float, a_float)
570
590
  ask_unit = 1 + 1j
591
+
592
+ # DEĞİŞİKLİK 2: Kuaterniyon bloğu artık tamamen farklı ve doğru çalışıyor.
593
+ elif kececi_type == TYPE_QUATERNION:
594
+ # Hem başlangıç hem de eklenen değer için virgülle ayrılmış formatı işler.
595
+ current_value = _parse_quaternion_from_csv(start_input_raw)
596
+ add_value_typed = _parse_quaternion_from_csv(add_input_raw)
597
+ ask_unit = np.quaternion(1, 1, 1, 1)
598
+
571
599
  elif kececi_type == TYPE_NEUTROSOPHIC:
572
600
  a, b = _parse_neutrosophic(start_input_raw)
573
601
  current_value = NeutrosophicNumber(a, b)
602
+ a_float = float(add_input_raw) # Girdi işleme bu bloğun içine taşındı
574
603
  add_value_typed = NeutrosophicNumber(a_float, 0)
575
604
  ask_unit = NeutrosophicNumber(1, 1)
605
+
576
606
  elif kececi_type == TYPE_NEUTROSOPHIC_COMPLEX:
577
607
  s_complex = _parse_complex(start_input_raw)
578
608
  current_value = NeutrosophicComplexNumber(s_complex.real, s_complex.imag, 0.0)
609
+ a_float = float(add_input_raw) # Girdi işleme bu bloğun içine taşındı
579
610
  add_value_typed = NeutrosophicComplexNumber(a_float, 0.0, 0.0)
580
611
  ask_unit = NeutrosophicComplexNumber(1, 1, 1)
612
+
581
613
  elif kececi_type == TYPE_HYPERREAL:
582
614
  a, b = _parse_hyperreal(start_input_raw)
583
615
  sequence_list = [a + b / n for n in range(1, 11)]
584
616
  current_value = HyperrealNumber(sequence_list)
617
+ a_float = float(add_input_raw) # Girdi işleme bu bloğun içine taşındı
585
618
  add_sequence = [a_float] + [0.0] * 9
586
619
  add_value_typed = HyperrealNumber(add_sequence)
587
620
  ask_unit = HyperrealNumber([1.0] * 10)
621
+
588
622
  elif kececi_type == TYPE_BICOMPLEX:
589
623
  s_complex = _parse_complex(start_input_raw)
624
+ a_float = float(add_input_raw) # Girdi işleme bu bloğun içine taşındı
590
625
  a_complex = complex(a_float)
591
626
  current_value = BicomplexNumber(s_complex, s_complex / 2)
592
627
  add_value_typed = BicomplexNumber(a_complex, a_complex / 2)
593
628
  ask_unit = BicomplexNumber(complex(1, 1), complex(0.5, 0.5))
629
+
594
630
  elif kececi_type == TYPE_NEUTROSOPHIC_BICOMPLEX:
595
631
  s_complex = _parse_complex(start_input_raw)
596
632
  current_value = NeutrosophicBicomplexNumber(s_complex.real, s_complex.imag, 0, 0, 0, 0, 0, 0)
633
+ a_float = float(add_input_raw) # Girdi işleme bu bloğun içine taşındı
597
634
  add_value_typed = NeutrosophicBicomplexNumber(a_float, 0, 0, 0, 0, 0, 0, 0)
598
635
  ask_unit = NeutrosophicBicomplexNumber(*([1.0] * 8))
599
- elif kececi_type == TYPE_QUATERNION:
600
- current_value = _parse_quaternion(start_input_raw)
601
- add_value_typed = np.quaternion(a_float, a_float, a_float, a_float)
602
- ask_unit = np.quaternion(1, 1, 1, 1)
603
636
 
604
637
  except (ValueError, TypeError) as e:
605
- print(f"ERROR: Failed to initialize type {kececi_type} with input '{start_input_raw}': {e}")
638
+ # Hata mesajı artık her iki girdiyi de göstererek daha faydalı
639
+ print(f"ERROR: Failed to initialize type {kececi_type} with start='{start_input_raw}' and increment='{add_input_raw}': {e}")
606
640
  return []
607
641
 
642
+ # Fonksiyonun geri kalan üreteç mantığı (döngü kısmı) aynı kalır.
608
643
  sequence = [current_value]
609
644
  last_divisor_used = None
610
645
  ask_counter = 0
@@ -694,13 +729,22 @@ def print_detailed_report(sequence: List[Any], params: Dict[str, Any]):
694
729
  # --- HIGH-LEVEL CONTROL FUNCTIONS ---
695
730
  # ==============================================================================
696
731
 
697
- def get_with_params(kececi_type_choice: int, iterations: int, start_value_raw: str = "0", add_value_base_scalar: float = 9.0) -> List[Any]:
698
- """Generates Keçeci Numbers with specified parameters."""
732
+ #def get_with_params(kececi_type_choice: int, iterations: int, start_value_raw: str = "0", add_value_base_scalar: float = 9.0) -> List[Any]:
733
+ # """Generates Keçeci Numbers with specified parameters."""
734
+ # print(f"\n--- Generating Sequence: Type {kececi_type_choice}, Steps {iterations} ---")
735
+ # print(f"Start: '{start_value_raw}', Increment: {add_value_base_scalar}")
736
+
737
+ # generated_sequence = unified_generator(
738
+ # kececi_type_choice, start_value_raw, add_value_base_scalar, iterations
739
+ # )
740
+
741
+ def get_with_params(kececi_type_choice: int, iterations: int, start_value_raw: str = "0.0,0.0,0.0,0.0", add_value_raw: str = "1.3,-2.1,0.5,3.4") -> List[Any]:
742
+ """Generates Keçeci Numbers with specified parameters, supporting full vectorial addition."""
699
743
  print(f"\n--- Generating Sequence: Type {kececi_type_choice}, Steps {iterations} ---")
700
- print(f"Start: '{start_value_raw}', Increment: {add_value_base_scalar}")
744
+ print(f"Start: '{start_value_raw}', Increment: '{add_value_raw}'")
701
745
 
702
746
  generated_sequence = unified_generator(
703
- kececi_type_choice, start_value_raw, add_value_base_scalar, iterations
747
+ kececi_type_choice, start_value_raw, add_value_raw, iterations
704
748
  )
705
749
 
706
750
  if generated_sequence:
@@ -748,7 +792,12 @@ def get_interactive() -> Tuple[List[Any], Dict[str, Any]]:
748
792
 
749
793
  start_prompt = prompts.get(type_choice, "Enter starting value: ")
750
794
  start_input_val_raw = input(start_prompt)
751
- add_base_scalar_val = float(input("Enter base scalar increment (e.g., 9.0): "))
795
+ #add_base_scalar_val = float(input("Enter base scalar increment (e.g., 9.0): "))
796
+ if type_choice == TYPE_QUATERNION:
797
+ add_input_val_raw = input("Enter quaternion increment (e.g., '1.3,-2.1,0.5,3.4'): ")
798
+ else:
799
+ # Diğer tipler için eski mantık devam edebilir veya hepsi için string istenir
800
+ add_input_val_raw = input("Enter increment value: ")
752
801
  num_kececi_steps = int(input("Enter number of Keçeci steps (e.g., 15): "))
753
802
 
754
803
  sequence = get_with_params(type_choice, num_kececi_steps, start_input_val_raw, add_base_scalar_val)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kececinumbers
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: Keçeci Numbers: An Exploration of a Dynamic Sequence Across Diverse Number Sets
5
5
  Home-page: https://github.com/WhiteSymmetry/kececinumbers
6
6
  Author: Mehmet Keçeci
@@ -59,7 +59,7 @@ Dynamic: maintainer
59
59
  Dynamic: maintainer-email
60
60
  Dynamic: requires-python
61
61
 
62
- # Keçeci Numbers: Keçeci Sayıları
62
+ # Keçeci Numbers: Keçeci Sayıları (Keçeci Conjecture)
63
63
  ---
64
64
 
65
65
  [![PyPI version](https://badge.fury.io/py/kececinumbers.svg)](https://badge.fury.io/py/kececinumbers/)
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "kececinumbers"
9
- version = "0.5.1"
9
+ version = "0.5.3"
10
10
 
11
11
  # Diğer proje bilgileri (isteğe bağlı ama tavsiye edilir)
12
12
  authors = [
File without changes
File without changes
File without changes
File without changes