Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
/ Quark Public archive

✨💥⚡️ Gota-go-fast quark primitive

License

Notifications You must be signed in to change notification settings

invocative/Quark

Repository files navigation

✨ Elementary Quark library ✨

Quark release Quark Status build Nuget Telegram

Remark:
This project is part of a closed project ElementarySandbox

Install

dotnet add package Elementary.Quarks --version 2.0.6

API

Remark:

- Quark is a implement IComparable, IComparable<Quark> and IEquatable<Quark> interface;
- Quark is a native marshaling compatible;
- Quark is a gota go fast structure;

ElectricChange

Base parse:

var e = ElectricChange.Token.Parse("+(1/2)") 
// has return new object
{
  IsPositive: true,
  Numerator: 1,
  Denominator: 2
}

e.ToString() // -> ["+(1/2)ℯ"]

Spin

Base parse:

var e = Spin.Token.Parse("(1/2)") 
// has return new object
{
  Numerator: 1,
  Denominator: 2
}

e.ToString() // -> ["(1/2)ħ"]

Quark

Support: u d s c b t quarks, and anti-quark ū d̄ s̄ c̄ b̄ t̄

Base parse:

var qList = Quark.Token.Parse("[u|u|d]") // uud a quark structure of proton

qList.First().ToString() // -> [u +(2/3)ℯ 2.3 MeV/c²]


qList.First()
// ->
{
  Mass: { "173.21 GeV" }
  Symbol: 'u',
  Type: TopQuark,
  ElectricCharge: "+(2/3)ℯ",
  Spin: "(1/2)ħ",
  Mass: { "9.74e+46 kg" },
  WeakType: Up,
  IsAnti: false
}


// Also supported antiquark

var antiquark = Quark.Token.Parse("[-u]").First()

antiquark.ToString() // -> [ū -(2/3)ℯ 2.3 MeV/c²]

Flavor Index and Strenght Correlation

While the process of flavor transformation is the same for all quarks, each quark has a preference to transform into the quark of its own generation.

GetFlavorTransformationIndexAt

return approximate magnitudes

Use:

Quark.Up.GetFlavorTransformationIndexAt(Quark.Down) // -> 0.974
GetStrengthsCorrelationAt

return approximate magnitudes correlation

Use:

Quark.Up.GetStrengthsCorrelationAt(Quark.Down) // -> 1.0

FOSSA Status