Changeset 18203 for trunk/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 01/17/22 21:34:43 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/InfixExpressionFormatter.cs
r18172 r18203 39 39 if (token == "+" || token == "-" || token == "OR" || token == "XOR") { 40 40 var parenthesisRequired = false; 41 if (node.Parent != null && node.Parent.SubtreeCount > 1) {41 if (node.Parent != null && IsOperator(node.Parent.Symbol)) { 42 42 var parentOp = GetToken(node.Parent.Symbol); 43 43 if (parentOp != "+" && parentOp != "-" && parentOp != "OR" && parentOp != "XOR") … … 154 154 } 155 155 } 156 } 157 158 private static bool IsOperator(ISymbol sy) { 159 return sy is Addition || 160 sy is Subtraction || 161 sy is Multiplication || 162 sy is Division || 163 sy is And || 164 sy is Or || 165 sy is Xor; 156 166 } 157 167
Note: See TracChangeset
for help on using the changeset viewer.