numanalysis 0.0.1__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.
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: numanalysis
3
+ Version: 0.0.1
4
+ Summary: Package for LU decomp
5
+ Home-page: https://github.com/1030minouche
6
+ Author: Aminouche
7
+ Author-email: solenouche@aminouche.fr
8
+ Classifier: Programming Language :: Python :: 2
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=2.7
12
+ Description-Content-Type: text/markdown
13
+ Dynamic: author
14
+ Dynamic: author-email
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: home-page
19
+ Dynamic: requires-python
20
+ Dynamic: summary
21
+
22
+ Building in progress
@@ -0,0 +1 @@
1
+ Building in progress
@@ -0,0 +1,2 @@
1
+ print("Package crée par Aminouche")
2
+ __all__ = ["lu"]
@@ -0,0 +1,56 @@
1
+ def verifCarre(A: list[list]) -> bool:
2
+ n = len(A)
3
+ return all(len(row) == n for row in A)
4
+
5
+
6
+ def llu_unit(A: list[list]) -> list[list]:
7
+ if not verifCarre(A):
8
+ raise ValueError("Matrice non carrée")
9
+
10
+ n = len(A)
11
+ L = [[0.0 for _ in range(n)] for _ in range(n)]
12
+ U = [[0.0 for _ in range(n)] for _ in range(n)]
13
+
14
+ for j in range(n):
15
+ # Diagonale unité
16
+ L[j][j] = 1.0
17
+
18
+ # Calcul des coefficients de U (ligne j)
19
+ for i in range(j + 1):
20
+ somme = sum(L[i][k] * U[k][j] for k in range(i))
21
+ U[i][j] = A[i][j] - somme
22
+
23
+ # Calcul des coefficients de L (colonne j)
24
+ for i in range(j + 1, n):
25
+ somme = sum(L[i][k] * U[k][j] for k in range(j))
26
+ if U[j][j] == 0:
27
+ raise ZeroDivisionError(f"U[{j}][{j}] = 0, décomposition impossible sans pivot")
28
+ L[i][j] = (A[i][j] - somme) / U[j][j]
29
+
30
+ return L
31
+
32
+ def ulu_unit(A: list[list]) -> list[list]:
33
+ if not verifCarre(A):
34
+ raise ValueError("Matrice non carrée")
35
+
36
+ n = len(A)
37
+ L = [[0.0 for _ in range(n)] for _ in range(n)]
38
+ U = [[0.0 for _ in range(n)] for _ in range(n)]
39
+
40
+ for j in range(n):
41
+ # Diagonale unité
42
+ L[j][j] = 1.0
43
+
44
+ # Calcul des coefficients de U (ligne j)
45
+ for i in range(j + 1):
46
+ somme = sum(L[i][k] * U[k][j] for k in range(i))
47
+ U[i][j] = A[i][j] - somme
48
+
49
+ # Calcul des coefficients de L (colonne j)
50
+ for i in range(j + 1, n):
51
+ somme = sum(L[i][k] * U[k][j] for k in range(j))
52
+ if U[j][j] == 0:
53
+ raise ZeroDivisionError(f"U[{j}][{j}] = 0, décomposition impossible sans pivot")
54
+ L[i][j] = (A[i][j] - somme) / U[j][j]
55
+
56
+ return U
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: numanalysis
3
+ Version: 0.0.1
4
+ Summary: Package for LU decomp
5
+ Home-page: https://github.com/1030minouche
6
+ Author: Aminouche
7
+ Author-email: solenouche@aminouche.fr
8
+ Classifier: Programming Language :: Python :: 2
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=2.7
12
+ Description-Content-Type: text/markdown
13
+ Dynamic: author
14
+ Dynamic: author-email
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: home-page
19
+ Dynamic: requires-python
20
+ Dynamic: summary
21
+
22
+ Building in progress
@@ -0,0 +1,8 @@
1
+ README.md
2
+ setup.py
3
+ numanalysis/__init__.py
4
+ numanalysis/lu.py
5
+ numanalysis.egg-info/PKG-INFO
6
+ numanalysis.egg-info/SOURCES.txt
7
+ numanalysis.egg-info/dependency_links.txt
8
+ numanalysis.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ numanalysis
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,20 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='numanalysis',
5
+ version='0.0.1',
6
+ packages=find_packages(),
7
+ description='Package for LU decomp',
8
+ long_description=open('README.md').read(),
9
+ long_description_content_type='text/markdown',
10
+ author='Aminouche',
11
+ author_email='solenouche@aminouche.fr',
12
+ url='https://github.com/1030minouche',
13
+ classifiers=[
14
+ 'Programming Language :: Python :: 2',
15
+ 'License :: OSI Approved :: MIT License',
16
+ 'Operating System :: OS Independent',
17
+ ],
18
+ python_requires='>=2.7',
19
+ install_requires=[],
20
+ )