Metadata-Version: 2.4
Name: 3pc-utils
Version: 1.0.0
Summary: A 3pc Python library for mathematical functions used in composite analysis.
Author: Omprakash Seresta
Author-email: oseresta@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# 3pc-utils

`3pc-utils` is a Python library containing mathematical functions and operators used in composite analysis. It provides various delta operators, Kronecker delta, and utilities for managing pairs of indices for composite lamination theory computations.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `3pc-utils`. Since the package is publicly available on PyPI, you can install it directly:

```bash
pip install 3pc-utils
```

## API Reference

### Mathematical Operators

The package provides a wide range of delta operators used in the solution of composite plate problems.

#### `delta1(m, n, p, q)` to `delta92(m, n, p, q)`
Calculates various delta operators based on integer indices `m, n, p, q`. These operators typically return a float value or zero based on parity and index equality.

#### `kronecker(m, n)`
Calculates the Kronecker delta. Returns `1` if `m == n`, else `0`.

### Utility Functions

#### `get_odd_even(m)`
Creates two lists of index pairs `(i, j)` for `i, j` in `range(1, m+1)`.
*   **`odd`**: Pairs where `i + j` is odd.
*   **`even`**: Pairs where `i + j` is even.

#### `get_pairs(m)`
Creates a list of all possible index pairs `(i, j)` for `i, j` in `range(1, m+1)`.

---

## Usage Examples

### Using Delta Operators

```python
from utils.utils import delta1, kronecker

# Calculate delta1 operator
val = delta1(1, 2, 3, 4)
print(f"Delta1 value: {val}")

# Calculate kronecker delta
k = kronecker(1, 1) # returns 1
print(f"Kronecker(1, 1): {k}")
```

### Managing Index Pairs

```python
from utils.utils import get_odd_even, get_pairs

# Get all pairs for a 4x4 system
all_pairs = get_pairs(4)

# Separate into odd and even combinations
odd_pairs, even_pairs = get_odd_even(4)
```

## Commands

The package provides a command-line interface entry point. After installing, you can run the main application using:

```bash
utils
```
*(Currently, this serves as an entry point defined in `utils.main:main`)*
