diff --git a/gtsam_unstable/discrete/examples/schedulingExample.cpp b/gtsam_unstable/discrete/examples/schedulingExample.cpp index 2b52a3e3a..47bcd0a85 100644 --- a/gtsam_unstable/discrete/examples/schedulingExample.cpp +++ b/gtsam_unstable/discrete/examples/schedulingExample.cpp @@ -108,7 +108,8 @@ void runLargeExample() { // Do brute force product and output that to file if (scheduler.nrStudents() == 1) { // otherwise too slow - DecisionTreeFactor product = scheduler.product(); + DecisionTreeFactor product = + *std::dynamic_pointer_cast(scheduler.product()); product.dot("scheduling-large", DefaultKeyFormatter, false); } diff --git a/gtsam_unstable/discrete/examples/schedulingQuals12.cpp b/gtsam_unstable/discrete/examples/schedulingQuals12.cpp index 913bfb21a..869c13459 100644 --- a/gtsam_unstable/discrete/examples/schedulingQuals12.cpp +++ b/gtsam_unstable/discrete/examples/schedulingQuals12.cpp @@ -108,7 +108,8 @@ void runLargeExample() { // Do brute force product and output that to file if (scheduler.nrStudents() == 1) { // otherwise too slow - DecisionTreeFactor product = scheduler.product(); + DecisionTreeFactor product = + *std::dynamic_pointer_cast(scheduler.product()); product.dot("scheduling-large", DefaultKeyFormatter, false); } diff --git a/gtsam_unstable/discrete/examples/schedulingQuals13.cpp b/gtsam_unstable/discrete/examples/schedulingQuals13.cpp index e52e3d0c6..487215e03 100644 --- a/gtsam_unstable/discrete/examples/schedulingQuals13.cpp +++ b/gtsam_unstable/discrete/examples/schedulingQuals13.cpp @@ -132,7 +132,8 @@ void runLargeExample() { // Do brute force product and output that to file if (scheduler.nrStudents() == 1) { // otherwise too slow - DecisionTreeFactor product = scheduler.product(); + DecisionTreeFactor product = + *std::dynamic_pointer_cast(scheduler.product()); product.dot("scheduling-large", DefaultKeyFormatter, false); }