Freeciv21
Develop your civilization from humble roots to a global empire
cm_state Struct Reference

State of the search. More...

+ Collaboration diagram for cm_state:

Public Attributes

struct cm_parameter parameter
 
struct citypcity
 
struct tile_type_vector lattice
 
struct tile_type_vector lattice_by_prod [O_LAST]
 
std::array< int, O_LASTcity_center_output = {0}
 
std::vector< std::array< int, O_LAST > > specialist_outputs = {}
 
std::vector< city * > gov_centers
 
std::array< cached_waste, O_LASTwaste
 
struct partial_solution best
 
struct cm_fitness best_value
 
int min_production [O_LAST]
 
int min_luxury
 
struct partial_solution current
 
struct {
   int *   stack
 
   int   size
 
choice
 
bool * workers_map
 

Detailed Description

State of the search.

This holds all the information needed to do the search, all in one struct, in order to clean up the function calls.

Definition at line 193 of file cm.cpp.

Member Data Documentation

◆ best

struct partial_solution cm_state::best

Definition at line 212 of file cm.cpp.

Referenced by bb_next(), choice_is_promising(), cm_find_best_solution(), and cm_state_free().

◆ best_value

struct cm_fitness cm_state::best_value

Definition at line 212 of file cm.cpp.

Referenced by bb_next(), and begin_search().

◆ 

◆ city_center_output

std::array<int, O_LAST> cm_state::city_center_output = {0}

Definition at line 203 of file cm.cpp.

Referenced by compute_max_stats_heuristic(), and init_tile_lattice().

◆ current

◆ gov_centers

std::vector<city *> cm_state::gov_centers

Definition at line 209 of file cm.cpp.

Referenced by apply_solution(), cm_query_result(), and compute_max_stats_heuristic().

◆ lattice

struct tile_type_vector cm_state::lattice

◆ lattice_by_prod

struct tile_type_vector cm_state::lattice_by_prod[O_LAST]

◆ min_luxury

int cm_state::min_luxury

Definition at line 225 of file cm.cpp.

Referenced by choice_is_promising().

◆ min_production

int cm_state::min_production[O_LAST]

Definition at line 222 of file cm.cpp.

Referenced by choice_is_promising(), and init_min_production().

◆ parameter

◆ pcity

◆ size

int cm_state::size

◆ specialist_outputs

std::vector<std::array<int, O_LAST> > cm_state::specialist_outputs = {}

Definition at line 206 of file cm.cpp.

Referenced by apply_solution(), and init_specialist_lattice_nodes().

◆ stack

int* cm_state::stack

Definition at line 235 of file cm.cpp.

Referenced by cm_state_free(), last_choice(), take_child_choice(), and take_sibling_choice().

◆ waste

std::array<cached_waste, O_LAST> cm_state::waste

Definition at line 212 of file cm.cpp.

Referenced by apply_solution(), and compute_max_stats_heuristic().

◆ workers_map

bool* cm_state::workers_map

Definition at line 239 of file cm.cpp.

Referenced by apply_solution(), cm_state_free(), and convert_solution_to_result().