this repo has no description
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
3/*
4 * Main authors:
5 * Jip J. Dekker <jip.dekker@monash.edu>
6 * Guido Tack <guido.tack@monash.edu>
7 */
8
9/* This Source Code Form is subject to the terms of the Mozilla Public
10 * License, v. 2.0. If a copy of the MPL was not distributed with this
11 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
12
13#include <minizinc/interpreter.hh>
14#include <minizinc/interpreter/vector.hh>
15
16namespace MiniZinc {
17
18bool Vec::isPar() const {
19 assert(alive());
20 for (int i = 0; i < this->size(); ++i) {
21 Val v = this->operator[](i);
22 if (v.isVec() && (!v.toVec()->isPar())) {
23 return false;
24 }
25 if (v.isVar()) {
26 return false;
27 }
28 }
29 return true;
30}
31
32} // namespace MiniZinc