Skip to content

Commit b8c960e

Browse files
committed
simplify
1 parent 158687f commit b8c960e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

forte/helpers/math_structures.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ class VectorSpace {
285285
F dot(const Derived& other) const {
286286
F result{0};
287287
bool self_smaller = size() < other.size();
288-
const auto& smaller = size() < other.size() ? elements() : other.elements();
289-
const auto& larger = size() < other.size() ? other.elements() : elements();
288+
const auto& smaller = self_smaller ? elements() : other.elements();
289+
const auto& larger = self_smaller ? other.elements() : elements();
290290
for (const auto& [e, c] : smaller) {
291291
if (const auto it = larger.find(e); it != larger.end()) {
292292
if (self_smaller) {

0 commit comments

Comments
 (0)