Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 1, 2022. It is now read-only.

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)e"]

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)e 2.3 MeV/c2]
qList.First()
// ->
{
 Mass: { "173.21 GeV" }
 Symbol: 'u',
 Type: TopQuark,
 ElectricCharge: "+(2/3)e",
 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)e 2.3 MeV/c2]

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

Sponsor this project

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /