MCPcopy Create free account

hub / github.com/advancedresearch/mix_economy / functions

Functions19 in github.com/advancedresearch/mix_economy

↓ 11 callersMethodgini
Find the Gini coefficient (see [Wikipedia article](https://en.wikipedia.org/wiki/Gini_coefficient)).
src/lib.rs:58
↓ 10 callersMethodtransaction
Does a transaction between two people.
src/lib.rs:74
↓ 9 callersMethodupdate
Updates the economy using the fixed tax rate. The Gini index can vary depending on economic activity.
src/lib.rs:89
↓ 3 callersMethodsolve
Updates the economy using a target Gini coefficient. The tax is automatically adjusted to meet the target. Uses convergent binary search to find the t
src/lib.rs:141
↓ 2 callersFunctiondraw_economy
(economy: &Economy, c: &Context, g: &mut G, players: usize)
examples/random_transactions.rs:211
↓ 2 callersFunctiondraw_economy
(economy: &Economy, color: [f32; 4], c: &Context, g: &mut G)
examples/demo.rs:113
↓ 2 callersFunctiondraw_economy
(economy: &Economy, c: &Context, g: &mut G, players: usize)
examples/random_transactions_solver.rs:157
↓ 1 callersFunctionsimulate
(settings: Settings)
examples/random_transactions.rs:123
↓ 1 callersFunctionsimulate
(settings: Settings)
examples/demo.rs:49
↓ 1 callersFunctionsimulate
(settings: Settings)
examples/random_transactions_solver.rs:57
↓ 1 callersFunctiontmp_settings
(id: u32, tax: f64)
examples/random_transactions.rs:109
↓ 1 callersFunctiontmp_settings
(target_gini: f64)
examples/demo.rs:31
↓ 1 callersFunctiontmp_settings
(id: u32, target_gini: f64)
examples/random_transactions_solver.rs:37
Methodadd_player
Adds a player to the economy.
src/lib.rs:41
Functionmain
()
examples/random_transactions.rs:25
Functionmain
()
examples/demo.rs:27
Functionmain
()
examples/random_transactions_solver.rs:29
Methodmin_max
Finds the minimum and maximum fortune.
src/lib.rs:47
Methodnew
Creates a new economy.
src/lib.rs:32