kececinumbers 0.5.1__py3-none-any.whl → 0.5.3__py3-none-any.whl
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.
- kececinumbers/__init__.py +3 -1
- kececinumbers/_version.py +1 -1
- kececinumbers/kececinumbers.py +65 -16
- {kececinumbers-0.5.1.dist-info → kececinumbers-0.5.3.dist-info}/METADATA +2 -2
- kececinumbers-0.5.3.dist-info/RECORD +10 -0
- kececinumbers-0.5.1.dist-info/RECORD +0 -10
- {kececinumbers-0.5.1.dist-info → kececinumbers-0.5.3.dist-info}/WHEEL +0 -0
- {kececinumbers-0.5.1.dist-info → kececinumbers-0.5.3.dist-info}/licenses/LICENSE +0 -0
- {kececinumbers-0.5.1.dist-info → kececinumbers-0.5.3.dist-info}/top_level.txt +0 -0
kececinumbers/__init__.py
CHANGED
@@ -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.
|
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,
|
kececinumbers/_version.py
CHANGED
kececinumbers/kececinumbers.py
CHANGED
@@ -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,
|
541
|
-
"""
|
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
|
-
|
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(
|
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 =
|
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(
|
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
|
-
|
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: {
|
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,
|
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.
|
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
|
[](https://badge.fury.io/py/kececinumbers/)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
docs/conf.py,sha256=jkpH_TchRJcC_EspKeY1E_rml2ODmIWhWoqvyCPu_ok,1116
|
2
|
+
kececinumbers/__init__.py,sha256=y_Wlgvwt1591rasdY-u__X0m8MB_mXdYtozcTWUrwvU,3758
|
3
|
+
kececinumbers/_version.py,sha256=FJEL_1hwFqZz6weWeGRoiwwCrv8TLw_rzkRGsS8JBkM,453
|
4
|
+
kececinumbers/kececinumbers.py,sha256=TS6vyqbtktEGf38UXVxJxF9xnUgw_B7LKHhodUobIxo,44135
|
5
|
+
kececinumbers-0.5.3.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
|
6
|
+
tests/test_sample.py,sha256=qMWUBGQtlF1gZHZ_e6Gye1vHtyNnUWH7iXK72a1y6VQ,9728
|
7
|
+
kececinumbers-0.5.3.dist-info/METADATA,sha256=AVxaBzyBIFghdP2-fudtGEZw5vvBgjptpWn6U6MWO70,33010
|
8
|
+
kececinumbers-0.5.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
9
|
+
kececinumbers-0.5.3.dist-info/top_level.txt,sha256=ABQEKRH9iYb4sWnFdx7gIx7Hg899YktRkQpbRlSSqwU,25
|
10
|
+
kececinumbers-0.5.3.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
docs/conf.py,sha256=jkpH_TchRJcC_EspKeY1E_rml2ODmIWhWoqvyCPu_ok,1116
|
2
|
-
kececinumbers/__init__.py,sha256=46zrd9XM0kqAIVXSlUexM7_d34oqRJIy8vDlvNisWBU,3688
|
3
|
-
kececinumbers/_version.py,sha256=G77E2WdNRJZcFQMn5X8NPZsy8EaBiuqWmenbOjRRClQ,453
|
4
|
-
kececinumbers/kececinumbers.py,sha256=XvIcSwXMyaEH8Aonz5OQKAk4DA0kOed4tTGejQCzh4w,41300
|
5
|
-
kececinumbers-0.5.1.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
|
6
|
-
tests/test_sample.py,sha256=qMWUBGQtlF1gZHZ_e6Gye1vHtyNnUWH7iXK72a1y6VQ,9728
|
7
|
-
kececinumbers-0.5.1.dist-info/METADATA,sha256=28TwzglS8JW-MFpvppBGRTKQ1v-NaC593kfL1hoR_zM,32989
|
8
|
-
kececinumbers-0.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
9
|
-
kececinumbers-0.5.1.dist-info/top_level.txt,sha256=ABQEKRH9iYb4sWnFdx7gIx7Hg899YktRkQpbRlSSqwU,25
|
10
|
-
kececinumbers-0.5.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|