Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/advancedresearch/mix_economy
/ functions
Functions
19 in github.com/advancedresearch/mix_economy
⨍
Functions
19
◇
Types & classes
4
↓ 11 callers
Method
gini
Find the Gini coefficient (see [Wikipedia article](https://en.wikipedia.org/wiki/Gini_coefficient)).
src/lib.rs:58
↓ 10 callers
Method
transaction
Does a transaction between two people.
src/lib.rs:74
↓ 9 callers
Method
update
Updates the economy using the fixed tax rate. The Gini index can vary depending on economic activity.
src/lib.rs:89
↓ 3 callers
Method
solve
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 callers
Function
draw_economy
(economy: &Economy, c: &Context, g: &mut G, players: usize)
examples/random_transactions.rs:211
↓ 2 callers
Function
draw_economy
(economy: &Economy, color: [f32; 4], c: &Context, g: &mut G)
examples/demo.rs:113
↓ 2 callers
Function
draw_economy
(economy: &Economy, c: &Context, g: &mut G, players: usize)
examples/random_transactions_solver.rs:157
↓ 1 callers
Function
simulate
(settings: Settings)
examples/random_transactions.rs:123
↓ 1 callers
Function
simulate
(settings: Settings)
examples/demo.rs:49
↓ 1 callers
Function
simulate
(settings: Settings)
examples/random_transactions_solver.rs:57
↓ 1 callers
Function
tmp_settings
(id: u32, tax: f64)
examples/random_transactions.rs:109
↓ 1 callers
Function
tmp_settings
(target_gini: f64)
examples/demo.rs:31
↓ 1 callers
Function
tmp_settings
(id: u32, target_gini: f64)
examples/random_transactions_solver.rs:37
Method
add_player
Adds a player to the economy.
src/lib.rs:41
Function
main
()
examples/random_transactions.rs:25
Function
main
()
examples/demo.rs:27
Function
main
()
examples/random_transactions_solver.rs:29
Method
min_max
Finds the minimum and maximum fortune.
src/lib.rs:47
Method
new
Creates a new economy.
src/lib.rs:32