forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[common] Extract core symbolic algebra into its own library (RobotLoc…
…omotion#17419) The vast majority of Drake code only uses the basic algebra of Variable, Expression, and Formula; it does not use extra analysis on top (polynomials, rationals, decomposition, simplification, etc.). By carving out Expression (and closely-related classes) into its own library, we can improve Drake's build times. Our pervasively-used default scalars now only pull in the basic algebra support, not all of the extra analysis code. This commit both adds such a library, and updates Drake to use it in cases where the extra code is not required.
- Loading branch information
1 parent
af2d887
commit 9b0cc4b
Showing
149 changed files
with
570 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -*- python -*- | ||
|
||
load( | ||
"@drake//tools/skylark:drake_cc.bzl", | ||
"drake_cc_library", | ||
"drake_cc_package_library", | ||
) | ||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
drake_cc_package_library( | ||
name = "symbolic", | ||
visibility = [ | ||
# TODO(jwnimmer-tri) Once we have moved all of the symbolic code from | ||
# drake/common/* into drake/common/symbolic/*, then we should make this | ||
# package library public. In the meantime, exposing it makes it too | ||
# easy to typo "//common:symbolic" vs "//common/symbolic". | ||
"//visibility:private", | ||
], | ||
deps = [ | ||
":expression", | ||
], | ||
) | ||
|
||
drake_cc_library( | ||
name = "expression", | ||
hdrs = ["expression.h"], | ||
deps = [ | ||
"//common/symbolic/expression", | ||
], | ||
) | ||
|
||
add_lint_tests() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
/// @file | ||
/// When using Drake's symbolic expressions library (e.g., the classes | ||
/// drake::symbolic::Expression or drake::symbolic::Formula), we provide | ||
/// a single include statement to cover all of he requied classes: | ||
/// `#include <drake/common/symbolic/expression.h>`. | ||
|
||
// Delegate the internal implementation details to our subdirectory. | ||
#include "drake/common/symbolic/expression/all.h" |
Oops, something went wrong.