1ª Versão Final da biblioteca numérica básica para o curso de programação 2.
Project description
CB2325NumericaG07
Uma biblioteca de Cálculo Numérico desenvolvida em Python, com recursos gráficos integrados.
Contexto Acadêmico:
Este projeto foi desenvolvido pelo Grupo 07 como trabalho final para a disciplina CB23 - Prog 02 (2025), ministrada pelo Prof. Emilio Brazil.
O objetivo principal é implementar os métodos numéricos centrais estudados em classe, encapsulando-os em uma biblioteca Python reutilizável, documentada e distribuída no PyPI.
Instalação
Você pode instalar a biblioteca diretamente do PyPI usando pip:
pip install CB2325NumericaG07
Funcionalidades Principais
Esta biblioteca cumpre todos os requisitos do projeto, implementando módulos para:
-
Raízes de Funções
-
Interpolação
-
Aproximação de Funções
-
Integração Numérica
-
Erros Numéricos
Todos os módulos que produzem saídas visuais (ex: Interpolação ou Aproximação) possuem parâmetros para gerar gráficos usando matplotlib.
Exemplo Rápido (Tutorial Rápido)
Veja como é simples encontrar raízes de funções ou interpolar uma nuvem de pontos.
Exemplo 1: Encontrando uma Raiz (Newton-Raphson)
# Importando o módulo de raízes
from CB2325NumericaG07.raizes import newton_raphson
# Definindo a função f(x) = x² - 9x + 5
função = lambda x: x**2 - 9*x + 5
tol = 1/100 # Definindo tolerância
resultado = metodo_newton_raphson(função, tol)
print(f'Valor calculado foi {resultado}')
# Saída esperada: Valor calculado foi 0.5948752170638366
Exemplo 2: Interpolação de Pontos (Hermite)
from CB2325NumericaG07.interpolacao import interpolacao_de_hermite
x_hermite = [0, 1, 4, 6, 8]
y_hermite = [0, 1, 2, 4, 2]
print('Hermite')
funcao_interpolada_h = interpolacao_de_hermite(x_hermite, y_hermite, plot=True)
ponto_teste_h = 0.5
valor_interpolado_h = funcao_interpolada_h(ponto_teste_h)
print(f"Pontos x: {x_hermite}")
print(f"Pontos y: {y_hermite}")
print(f"f(x) interpolado em x={ponto_teste_h}: {valor_interpolado_h}")
#Saida esperada:
#Hermite
#Pontos x: [0, 1, 4, 6, 8]
#Pontos y: [0, 1, 2, 4, 2]
#f(x) interpolado em x=0.5: 0.6149757407960439
Estrutura do Projeto
O repositório está organizado conforme os requisitos do trabalho:
CB2325NumericaG07/
├── CB2325NumericaG07/ # O pacote python (código fonte)
│ ├── __init__.py
│ ├── raizes.py
│ ├── interpolacao.py
│ ├── aproximacao.py
│ └── integracao.py
| └── erros.py
├── docs/ # Documentação em Markdown
│ └── aproximacao.md
| └── ...
├── notebooks_demos/ # Notebooks Jupyter com exemplos de uso
| └── integracao_demo.ipynb
| └── ...
├── testes_unitarios/ # Arquivos .py para test com pytest
| └── test_interpolacao.py
| └── ...
├── README.md # Este arquivo
├── pyproject.toml # Configuração do pacote
├── LICENSE
├── MANIFEST.in # Para pypi
├── requirements.txt # Para pip
└── .gitignore
Autores (Grupo 07)
- Gabriel Da Silva Rodrigues
- Josiete Morais Santos Silva
- José Armando Silva Duarte
- Kayky Lopes Teixeira Martins
- Lucas Mourão Cerqueira E Silva
- Lucca Moulin Cruz
- Marcella Decembrino De Souza
- Maria Izabelle Sousa Da Silva
- Mateus Bandeira De Mello Torres
- Rhuan Soler De Almeida
Licença
Este projeto é licenciado sob a Licença MIT. Veja o arquivo pyproject.toml para mais detalhes.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cb2325numericag07-1.0.0.tar.gz.
File metadata
- Download URL: cb2325numericag07-1.0.0.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ea2008a7b7d071f8b4213603c3ecd0ed185c9d1595e0b864b8eef85a955c73e
|
|
| MD5 |
5afe15395b40040f4b030cc1694bb3be
|
|
| BLAKE2b-256 |
c9d06c443ebf2374710ead46168b30445f7b38adb98216e06c94381f3ea23dbd
|
Provenance
The following attestation bundles were made for cb2325numericag07-1.0.0.tar.gz:
Publisher:
python-publish.yml on Mateus-Band/CB2325NumericaG07
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cb2325numericag07-1.0.0.tar.gz -
Subject digest:
8ea2008a7b7d071f8b4213603c3ecd0ed185c9d1595e0b864b8eef85a955c73e - Sigstore transparency entry: 701689792
- Sigstore integration time:
-
Permalink:
Mateus-Band/CB2325NumericaG07@3723bb661d21fb91236a3d09f2c990ad9afc2fee -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/Mateus-Band
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3723bb661d21fb91236a3d09f2c990ad9afc2fee -
Trigger Event:
release
-
Statement type:
File details
Details for the file cb2325numericag07-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cb2325numericag07-1.0.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f20ad28c9fe1ae482952628155cf3f606871b92a58c7f9b9f5a21dcba84a0005
|
|
| MD5 |
629acb42711772ca8cf3df4a668dcca6
|
|
| BLAKE2b-256 |
ca9ed165b7eebad5a9e0665c101d9db6c58020a3a6ff9bfbbadb52208db6d3db
|
Provenance
The following attestation bundles were made for cb2325numericag07-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on Mateus-Band/CB2325NumericaG07
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cb2325numericag07-1.0.0-py3-none-any.whl -
Subject digest:
f20ad28c9fe1ae482952628155cf3f606871b92a58c7f9b9f5a21dcba84a0005 - Sigstore transparency entry: 701689793
- Sigstore integration time:
-
Permalink:
Mateus-Band/CB2325NumericaG07@3723bb661d21fb91236a3d09f2c990ad9afc2fee -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/Mateus-Band
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3723bb661d21fb91236a3d09f2c990ad9afc2fee -
Trigger Event:
release
-
Statement type: