examples: [u]int32 -> [u]int32_t
note: sed -i 's/\b\([u]\?int32\)\b/\1_t/g' *.h *.cc
This commit is contained in:
@@ -30,7 +30,7 @@ typedef std::function<int64_t(RoutingNodeIndex, RoutingNodeIndex)>
|
||||
RoutingNodeEvaluator2;
|
||||
|
||||
// Random seed generator.
|
||||
int32 GetSeed(bool deterministic);
|
||||
int32_t GetSeed(bool deterministic);
|
||||
|
||||
// Location container, contains positions of orders and can be used to obtain
|
||||
// Manhattan distances/times between locations.
|
||||
@@ -130,7 +130,7 @@ void DisplayPlan(
|
||||
|
||||
using NodeIndex = RoutingIndexManager::NodeIndex;
|
||||
|
||||
int32 GetSeed(bool deterministic) {
|
||||
int32_t GetSeed(bool deterministic) {
|
||||
if (deterministic) {
|
||||
return ACMRandom::DeterministicSeed();
|
||||
} else {
|
||||
|
||||
@@ -55,7 +55,7 @@ ABSL_FLAG(std::string, routing_search_parameters,
|
||||
namespace operations_research {
|
||||
|
||||
// Random seed generator.
|
||||
int32 GetSeed() {
|
||||
int32_t GetSeed() {
|
||||
if (absl::GetFlag(FLAGS_tsp_use_deterministic_random_seed)) {
|
||||
return ACMRandom::DeterministicSeed();
|
||||
} else {
|
||||
|
||||
@@ -55,12 +55,12 @@ static double Distance(const Location& src, const Location& dst) {
|
||||
}
|
||||
|
||||
static void UncapacitatedFacilityLocation(
|
||||
int32 facilities, int32 clients, double fix_cost,
|
||||
int32_t facilities, int32_t clients, double fix_cost,
|
||||
MPSolver::OptimizationProblemType optimization_problem_type) {
|
||||
LOG(INFO) << "Starting " << __func__;
|
||||
// Local Constants
|
||||
const int32 kXMax = 1000;
|
||||
const int32 kYMax = 1000;
|
||||
const int32_t kXMax = 1000;
|
||||
const int32_t kYMax = 1000;
|
||||
const double kMaxDistance = 6 * sqrt((kXMax * kYMax)) / facilities;
|
||||
const int kStrLen = 1024;
|
||||
// char buffer for names
|
||||
@@ -186,7 +186,7 @@ static void UncapacitatedFacilityLocation(
|
||||
}
|
||||
}
|
||||
|
||||
void RunAllExamples(int32 facilities, int32 clients, double fix_cost) {
|
||||
void RunAllExamples(int32_t facilities, int32_t clients, double fix_cost) {
|
||||
#if defined(USE_CBC)
|
||||
LOG(INFO) << "---- Integer programming example with CBC ----";
|
||||
UncapacitatedFacilityLocation(facilities, clients, fix_cost,
|
||||
|
||||
Reference in New Issue
Block a user