DotNet Reference

.Net Reference

Google.OrTools.Util Namespace Reference


class  Domain
class  Int64Vector
class  Int64VectorVector
class  IntVector
class  IntVectorVector
class  operations_research_util
class  operations_research_utilPINVOKE
class  OptionalBooleanReflection
 Holder for reflection information generated from ortools/util/optional_boolean.proto More...


enum  OptionalBoolean { BoolUnspecified = 0, BoolFalse = 2, BoolTrue = 3 }
 A "three-way" boolean: unspecified, false or true. More...

Enumeration Type Documentation

◆ OptionalBoolean

enum OptionalBoolean

A "three-way" boolean: unspecified, false or true.

We don't use the value of 1 to increase the chance to catch bugs: eg. in python, a user may set a proto field of this type enum to a boolean value without type checks, if they set it to True, the proto validity code will catch it (because it'll be cast to 1, which is an invalid enum value). Note that if the user sets if to False (i.e. 0), it will be caught by the routing library's parameter validity check too.


Definition at line 50 of file OptionalBoolean.pb.cs.