Skip to main content

Working with netrosophic sets

Project description

Neutrosophic Calculator

A Python library for performing operations on neutrosophic sets. This library supports basic arithmetic and algebraic operations, scalar multiplication, and logical operations on neutrosophic sets.

Installation

pip install neutrosophic
# netrosophic

Usage Instructions

Creating Neutrosophic Sets

You can create a neutrosophic set using truth, indeterminacy, and falsity values.

from netrosophic import NetrosophicSet

# Create a neutrosophic set
ns = NetrosophicSet(0.5, 0.3, 0.2)
print("Neutrosophic Set:", ns)

Arithmetic Operations on Neutrosophic Sets

You can perform basic arithmetic operations such as addition, subtraction, multiplication, and division on neutrosophic sets.

from netrosophic import NetrosophicSet

ns1 = NetrosophicSet(0.5, 0.3, 0.2)
ns2 = NetrosophicSet(0.4, 0.2, 0.1)

# Addition
result_add = ns1 + ns2
print("Addition:", result_add)

# Subtraction
result_sub = ns1 - ns2
print("Subtraction:", result_sub)

# Multiplication
result_mul = ns1 * ns2
print("Multiplication:", result_mul)

# Division by a scalar
result_div = ns1 / 0.5
print("Division:", result_div)

Scalar Multiplication

You can multiply a neutrosophic set by a scalar.

scalar = 2.0
result_scalar_mul = ns1.scalar_mul(scalar)
print("Scalar Multiplication:", result_scalar_mul)

Logical Operations

Logical operations such as conjunction, disjunction, and negation can be performed using the NetrosophicLogic class.

from netrosophic import NetrosophicLogic

logic = NetrosophicLogic()
result_conj = logic.conjunction(ns1, ns2)
print("Conjunction:", result_conj)

result_disj = logic.disjunction(ns1, ns2)
print("Disjunction:", result_disj)

result_neg = logic.negation(ns1)
print("Negation:", result_neg)

Analyzing a Neutrosophic Set

You can analyze a neutrosophic set to get a detailed breakdown of its truth, indeterminacy, falsity, and overall certainty.

from netrosophic import NetrosophicAnalyzer

analyzer = NetrosophicAnalyzer()
analysis = analyzer.analyze(ns1)
print("Analysis:\n", analysis)

Creating Neutrosophic Sets from Tuples

You can create a neutrosophic set from a tuple and also convert a neutrosophic set back to a tuple.

# Creating from tuple
ns3 = NetrosophicSet.from_tuple((0.6, 0.5, 0.4))
print("From tuple:", ns3)

# Converting to tuple
print("To tuple:", ns1.to_tuple())

Features

  • Basic Arithmetic Operations: Add, subtract, multiply, and divide neutrosophic sets.
  • Scalar Multiplication: Multiply a neutrosophic set by a scalar.
  • Logical Operations: Perform conjunction, disjunction, and negation on neutrosophic sets.
  • Analysis: Analyze a neutrosophic set to understand its components.
  • Tuple Conversion: Create neutrosophic sets from tuples and convert them back to tuples.

License

This project is licensed under the MIT License.

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

neutrosophics-0.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

neutrosophics-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file neutrosophics-0.0.2.tar.gz.

File metadata

  • Download URL: neutrosophics-0.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for neutrosophics-0.0.2.tar.gz
Algorithm Hash digest
SHA256 73d7ceffab2935cc18b7639d585969c4d75808f8d65cf2045f3b65eabfc8cab5
MD5 8910b90b0d3e0d2b1024aa0ff23618d2
BLAKE2b-256 2622ac7289d7b03b883aa2f8e4f3e7c8bde73ec17879a3274b88bce1ec80bcbb

See more details on using hashes here.

File details

Details for the file neutrosophics-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: neutrosophics-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for neutrosophics-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 239cb724d91a66e39b9102969820168330d370df74c7efce007af1500e125e26
MD5 2e8b12f3abb85d89fe18a8bc87ca578d
BLAKE2b-256 f4e2531a6b21a3b1d51ae1b2a1eab4e495e6b561ac7bfd49db5834f1257ab41b

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