@@ -32,7 +32,7 @@ std::string getLabel(const ComputationGraph& g, const std::size_t i, const bool
3232 if (l != g.labels ().end () && includeLabels) {
3333 for (auto tmp = l->second .begin (); tmp != l->second .end (); ++tmp) {
3434 label = label + (tmp == l->second .begin () ? " [" : " " ) + *tmp +
35- (tmp != std::next (l->second .end (), -1 ) ? " , " : " ]" );
35+ (tmp != std::next (l->second .end (), -1 ) ? " ; " : " ]" );
3636 }
3737 }
3838 return label;
@@ -41,26 +41,30 @@ std::string getLabel(const ComputationGraph& g, const std::size_t i, const bool
4141
4242template <class T >
4343std::string ssaForm (const ComputationGraph& g, const std::vector<std::string>& opCodeLabels,
44- const std::vector<T>& values) {
44+ const std::vector<T>& values, const std::vector<T>& values2 ) {
4545
4646 std::ostringstream os;
4747
4848 for (std::size_t i = 0 ; i < g.size (); ++i) {
4949
50- os << i << " : " << getLabel (g, i);
50+ os << i << " , " << getLabel (g, i);
5151
52+ os << " ," ;
5253 if (!g.predecessors (i).empty ()) {
53- os << " = " ;
5454 os << (opCodeLabels.size () > g.opId (i) ? opCodeLabels[g.opId (i)] : " ???" ) << " (" ;
5555 for (std::size_t j = 0 ; j < g.predecessors (i).size (); ++j) {
5656 auto p = g.predecessors (i)[j];
57- os << getLabel (g, p, false ) << (j < g.predecessors (i).size () - 1 ? " , " : " " );
57+ os << getLabel (g, p, false ) << (j < g.predecessors (i).size () - 1 ? " ; " : " " );
5858 }
5959 os << " )" ;
6060 }
6161
6262 if (values.size () > i) {
63- os << " -> " << values[i];
63+ os << " ," << values[i];
64+ }
65+
66+ if (values2.size () > i) {
67+ os << " ," << values2[i];
6468 }
6569
6670 os << " \n " ;
@@ -70,8 +74,8 @@ std::string ssaForm(const ComputationGraph& g, const std::vector<std::string>& o
7074}
7175
7276template std::string ssaForm (const ComputationGraph& g, const std::vector<std::string>& opCodeLabels,
73- const std::vector<double >& values);
77+ const std::vector<double >& values, const std::vector< double >& values2 );
7478template std::string ssaForm (const ComputationGraph& g, const std::vector<std::string>& opCodeLabels,
75- const std::vector<RandomVariable>& values);
79+ const std::vector<RandomVariable>& values, const std::vector<RandomVariable>& values2 );
7680
7781} // namespace QuantExt
0 commit comments