[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eLinearExpr\u003c/code\u003e in C++ represents a linear expression within the OR-Tools library and can be constructed from constants, variables, or other expressions.\u003c/p\u003e\n"],["\u003cp\u003eSeveral methods are available for interacting with \u003ccode\u003eLinearExpr\u003c/code\u003e, including accessing offset value, solution value, terms, and converting it to a string.\u003c/p\u003e\n"],["\u003cp\u003eIt provides functionalities such as negation of variables using \u003ccode\u003eNotVar\u003c/code\u003e and accessing underlying terms and coefficients through the \u003ccode\u003eterms\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLinearExpr\u003c/code\u003e is essential for building and manipulating constraints and objectives in mathematical optimization models within the OR-Tools framework.\u003c/p\u003e\n"]]],["The `LinearExpr` class in C++ offers methods for linear expressions. `LinearExpr` constructors accept a constant (`double`) or an `MPVariable`. `NotVar` creates a `LinearExpr`. `offset` returns a `double`, `terms` returns a map of `MPVariable` to `double`, and `SolutionValue` also returns a `double`. `ToString` outputs a `std::string`. These methods allow for the construction, manipulation, and examination of linear expressions within the OR-Tools library.\n"],null,["# LinearExpr\n\nC++ Reference: class LinearExpr\n===============================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|\n| [`LinearExpr`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L116) | \u003cbr /\u003e |\n| [`LinearExpr`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L118) | \u003cbr /\u003e Arguments: `double constant` Possible implicit conversions are intentional. |\n| [`LinearExpr`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L125) | \u003cbr /\u003e Arguments: `const MPVariable* var` \u003cbr /\u003e |\n| [`NotVar`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L134) | Return type: `static LinearExpr ` Arguments: `LinearExpr var` \u003cbr /\u003e |\n| [`offset`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L142) | Return type: `double ` \u003cbr /\u003e |\n| [`SolutionValue`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L152) | Return type: `double ` \u003cbr /\u003e |\n| [`terms`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L143) | Return type: `const absl::flat_hash_map\u003cconst MPVariable*, double\u003e& ` \u003cbr /\u003e |\n| [`ToString`](https://github.com/google/or-tools/blob/v9.4/ortools/linear_solver/linear_expr.h#L158) | Return type: `std::string ` \u003cbr /\u003e |"]]