# Introduction

Nancy is a flexible C# library for Deterministic Network Calculus computations. It implements min-plus and max-plus operators, and handles ultimately pseudo-periodic piecewise affine curves.

It has been developed by Raffaele Zippo and Giovanni Stea (University of Pisa, Italy), partly during a joint research project with Arm LTD, Cambridge (UK). The authors would like to thank the Arm staff involved in that project, and particularly Dr. Matteo Andreozzi, for useful discussions and suggestions. Nancy is released under the MIT license.

Here you can find its full documentation. Its packages are:

- Unipi.Nancy, which uses BigRational as its numerical type
- Unipi.Nancy.LongRational, which uses LongRational as its numerical type

Note that other packages are currently based only on the BigRational version, due to its numerical stability.

# Namaspaces

## Unipi.Nancy.MinPlusAlgebra

This namespace contains the main types of the library, supporting DNC operations for generic UPP curves.

## Unipi.Nancy.NetworkCalculus

This namespace contains the derived types for common types of curves.

These types provide simplified constructors and optimized operations, so it's generally advised to use these when you can.

## Unipi.Nancy.Numerics

This namespace contains the numeric types used in Nancy.

Nancy uses rational numbers, to ensure correctness of computations.

LongRational represents rational numbers using 64 bit integers as numerator and denominator. It is fast, but the precision is limited and can result in arithmetic overflows.

BigRational uses instead BigIntegers for numerator and denominator. This type represents integers with an unlimited amount of bits, ensuring arithmetic overflows are never a problem at the cost of lower speed.

Rational is equal to either of those two, based on which of these compilation flags is used:

`BIG_RATIONAL`

`LONG_RATIONAL`

By default, Nancy is compiled using `BIG_RATIONAL`

.