run pyformat on python examples

This commit is contained in:
Laurent Perron
2018-06-11 11:51:18 +02:00
parent 92433a8e5d
commit 72db1d9ef2
164 changed files with 3657 additions and 4210 deletions

View File

@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Global constraint regular in Google CP Solver.
@@ -183,20 +182,20 @@ def main():
accepting_states = [n_states]
# declare variables
reg_input = [solver.IntVar(1, input_max, 'reg_input[%i]' % i)
for i in range(this_len)]
reg_input = [
solver.IntVar(1, input_max, 'reg_input[%i]' % i) for i in range(this_len)
]
#
# constraints
#
regular(reg_input, n_states, input_max, transition_fn,
initial_state, accepting_states)
regular(reg_input, n_states, input_max, transition_fn, initial_state,
accepting_states)
#
# solution and search
#
db = solver.Phase(reg_input,
solver.CHOOSE_MIN_SIZE_HIGHEST_MAX,
db = solver.Phase(reg_input, solver.CHOOSE_MIN_SIZE_HIGHEST_MAX,
solver.ASSIGN_MIN_VALUE)
solver.NewSearch(db)