Skip to main content

Librería para resolver problemas de ecuaciones lineales y no lineales a través de diferentes métodos numéricos.

Project description

CG19057UNO

Descripción

CG19057UNO es una librería en Python diseñada para resolver sistemas de ecuaciones lineales y no lineales utilizando métodos numéricos como:

  • Eliminación de Gauss
  • Gauss-Jordan
  • Regla de Cramer
  • Descomposición LU
  • Método de Jacobi
  • Método de Gauss-Seidel
  • Método de Bisección

Requisitos

  • Python 3.6 o superior
  • Bibliotecas necesarias:
    • numpy
    • scipy

Para instalar las dependencias necesarias, ejecuta:

pip install numpy scipy
pip install pytest

Instalacion:

La libreria se puede instalar directamente desde PyPI con el siguiente comando:

pip install CG19057UNO

Pruebas:

Para ejecutar las pruebas unitarias incluidas en el proyecto ejecutar:

python -m pytest tests/

Para ejecutar los ejemplos incluidos en el proyecto ejecutar:

python ejemplos_todosMetodos.py

Uso:

Ejemplos de como usar la libreria:

from CG19057UNO.EcuacionesLineales import elimina_Gauss

from CG19057UNO.EcuacionesNoLineales import biseccion

#Ejemplo usando eliminacion de Gauss

#Sistema de ecuaciones:

#x + 2y + z = 7

#3x + y + z = 5

#2x + 3y - z = 3

def ejemplo_elimina_Gauss():

A = [
    
    [1, 2, 1],
    
    [3, 1, 1],
    
    [2, 3, -1]

]

b = [7, 5, 3]

solucion = elimina_Gauss(A, b)

print("Solucion eliminacion de Gauss:", solucion)

#Ejemplo usando Biseccion

def ejemplo_biseccion():

f = lambda x: x**2 - 4

raiz = biseccion(f, 0, 3)

print("Bisección:", raiz)

Metodos implementados:

Para sistemas de ecuaciones lineales

  • Eliminacion de Gauss: elimina_Gauss(coeficiente_M, vector_I)
  • Gauss-Jordan:gauss_Jordan(coeficiente_M, vector_I)
  • Crammer: crammer(coeficiente_M, vector_I)
  • Descomposicion LU: descomposicion_LU(coeficiente_M, vector_I)
  • Jacobi: jacobi(coeficiente_M, vector_I, estimacion_Ini=None, tolerancia=1e-6, max_Iteraciones=100)
  • Gauss-Seidel: gauss_seidel(coeficiente_M, vector_I, estimacion_Ini=None, tolerancia=1e-6 max_iteraciones=100)

Para sistemas de ecuaciones no lineales

  • Biseccion: biseccion(funcion_Resolver, extremo_Izquierdo, extremo_derecho, tolerancia=1e-6, max_iteraciones=100)

Licencia:

Este proyecto esta bajo la licencia MIT. Consultar el archivo LICENSE para mas detalles.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cg19057uno-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cg19057uno-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file cg19057uno-0.1.0.tar.gz.

File metadata

  • Download URL: cg19057uno-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cg19057uno-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9c8b31b5646c710ff0dfb5250ef74ed44d604ae5670303524e3500c3b1f5d45
MD5 4bfd8afd7031c9e84268b6b3d105a91e
BLAKE2b-256 28ef786ca007e2c0c5a78e4739491f0e01ccdac22a1a7a2afe73e1a3a29642a8

See more details on using hashes here.

File details

Details for the file cg19057uno-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cg19057uno-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cg19057uno-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63019c9ecb169a40808f263c5e863f85a918aa0a0e74c305418772bbda5b608d
MD5 49042c71f2bdd33c2d8cf9bed073c2d5
BLAKE2b-256 ce59ad30d65694ea07c7bd2dd29321c16c88ac7d8943e68bd1a7286507e5376f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page