adnus
收藏Figshare2025-07-22 更新2026-04-28 收录
下载链接:
https://figshare.com/articles/dataset/adnus/29621336
下载链接
链接失效反馈官方服务:
资源简介:
adnus (AdNuS): Advanced Number Systemsadnus is a Python library that provides an implementation of various advanced number systems. This library is designed for mathematicians, researchers, and developers who need to work with number systems beyond the standard real and complex numbers. FeaturesHarmonic and Oresme Sequences: Functions to generate harmonic numbers and Oresme sequences.Bicomplex Numbers: A class for bicomplex numbers with full arithmetic support.Neutrosophic Numbers: Classes for neutrosophic numbers, including their complex and bicomplex extensions.Hyperreal Numbers: A conceptual implementation of hyperreal numbers.Extensible Design: Built with an abstract base class to easily extend and add new number systems.Fully Typed: The library is fully type-hinted for better code quality and maintainability.InstallationTo install the library, clone the repository and use Poetry:git clone https://github.com/WhiteSymmetry/adnus.git cd adnus poetry installUsageHere's a quick overview of how to use the different number systems available in adnus. Bicomplex Numbersimport adnus as ad #from adnus import BicomplexNumberz1 = ad.BicomplexNumber(1 + 2j, 3 + 4j) z2 = ad.BicomplexNumber(5 + 6j, 7 + 8j)print(f"Addition: {z1 + z2}") print(f"Multiplication: {z1 * z2}")Neutrosophic Numbersimport adnus as adn1 = ad.NeutrosophicNumber(1.5, 2.5) n2 = ad. NeutrosophicNumber(3.0, 4.0)print(f"Addition: {n1 + n2}") print(f"Multiplication: {n1 * n2}")Running TestsTo ensure everything is working correctly, you can run the included tests using pytest:poetry run pytestKurulum (Türkçe) / Installation (English) Python ile Kurulum / Install with pip, conda, mambapip install adnus -U python -m pip install -U adnus conda install bilgi::adnus -y mamba install bilgi::adnus -ypip uninstall adnus -ypip install -U adnuspython -m pip install -U adnusGithub Master Kurulumu / GitHub Master InstallationTerminal:pip install git+https://github.com/WhiteSymmetry/adnus.gitJupyter Lab, Notebook, Visual Studio Code:!pip install git+https://github.com/WhiteSymmetry/adnus.gitor%pip install git+https://github.com/WhiteSymmetry/adnus.git
adnus(AdNuS):高级数系统库
adnus是一款Python库,实现了多种高级数系统,面向需要使用标准实数、复数之外数系统的数学家、研究者与开发者。
## 核心特性
1. 调和与奥雷斯姆序列:提供生成调和数与奥雷斯姆序列的函数。
2. 双复数(Bicomplex)数:支持完整算术运算的双复数类。
3. 中智数(Neutrosophic Number):涵盖其复数、双复扩展形式的中智数类。
4. 超实数(Hyperreal)数:超实数的概念性实现。
5. 可扩展设计:基于抽象基类构建,可轻松扩展并添加新的数系统。
6. 全类型注解:库全面采用类型提示,以提升代码质量与可维护性。
## 安装方法
### 方式一:通过Poetry安装
克隆仓库并使用Poetry完成安装:
bash
git clone https://github.com/WhiteSymmetry/adnus.git
cd adnus
poetry install
### 通用安装方式(支持pip、conda、mamba)
可通过以下命令进行安装与更新:
bash
# 更新安装adnus
pip install adnus -U
python -m pip install -U adnus
conda install bilgi::adnus -y
mamba install bilgi::adnus -y
# 卸载与重新安装
pip uninstall adnus -y
pip install -U adnus
python -m pip install -U adnus
### GitHub主分支安装
#### 终端环境
bash
pip install git+https://github.com/WhiteSymmetry/adnus.git
#### Jupyter Lab、Notebook或Visual Studio Code环境
bash
!pip install git+https://github.com/WhiteSymmetry/adnus.git
# 或
%pip install git+https://github.com/WhiteSymmetry/adnus.git
## 使用示例
以下为adnus中各类数系统的快速使用示例。
### 双复数使用示例
python
import adnus as ad
# from adnus import BicomplexNumber
z1 = ad.BicomplexNumber(1 + 2j, 3 + 4j)
z2 = ad.BicomplexNumber(5 + 6j, 7 + 8j)
print(f"加法结果:{z1 + z2}")
print(f"乘法结果:{z1 * z2}")
### 中智数使用示例
python
import adnus as ad
n1 = ad.NeutrosophicNumber(1.5, 2.5)
n2 = ad.NeutrosophicNumber(3.0, 4.0)
print(f"加法结果:{n1 + n2}")
print(f"乘法结果:{n1 * n2}")
## 运行测试
可使用pytest运行内置测试以验证功能是否正常:
bash
poetry run pytest
创建时间:
2025-07-22



