Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
string_array.h File Reference
#include <string>
#include <vector>
#include "absl/strings/string_view.h"

Go to the source code of this file.

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 

Macros

#define RETURN_STRINGIFIED_VECTOR(vector, separator, method)
 -------— Pretty Print Helpers -------—
 

Functions

template<class T >
std::string operations_research::JoinDebugString (const std::vector< T > &v, absl::string_view separator)
 Join v[i].DebugString().
 
template<class T >
std::string operations_research::JoinDebugStringPtr (const std::vector< T > &v, absl::string_view separator)
 Join v[i]->DebugString().
 
template<class T >
std::string operations_research::JoinNamePtr (const std::vector< T > &v, absl::string_view separator)
 Join v[i]->name().
 
template<class T >
std::string operations_research::JoinNameFieldPtr (const std::vector< T > &v, absl::string_view separator)
 Join v[i]->name.
 

Macro Definition Documentation

◆ RETURN_STRINGIFIED_VECTOR

#define RETURN_STRINGIFIED_VECTOR ( vector,
separator,
method )
Value:
std::string out; \
for (int i = 0; i < vector.size(); ++i) { \
if (i > 0) out += separator; \
out += vector[i] method; \
} \
return out

-------— Pretty Print Helpers -------—

See the straightforward (and unique) usage of this macro below.

Definition at line 26 of file string_array.h.