From 132726568a1348cb1bbed894b0c8554b0ddc3c15 Mon Sep 17 00:00:00 2001 From: sagebei Date: Wed, 12 Jul 2023 08:17:09 +0800 Subject: [PATCH] add tutorials --- core/include/forbidden_permutation.h | 4 ++-- core/src/forbidden_permutation.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/include/forbidden_permutation.h b/core/include/forbidden_permutation.h index 03e345c..e5ef945 100644 --- a/core/include/forbidden_permutation.h +++ b/core/include/forbidden_permutation.h @@ -32,8 +32,8 @@ class ForbiddenPermutation TLS init_tls(); TLS init_tls_by_scheme(const std::function& scheme_fun); - TLS assign_laws(TLS tls, const Tuple& tuple, const Laws laws); - TLS assign_laws_by_index(TLS tls, Int32 index, const Laws laws); + TLS assign_laws(TLS tls, const Tuple& tuple, const Laws& laws); + TLS assign_laws_by_index(TLS tls, Int32 index, const Laws& laws); bool check_permutation(const IntList& permutation, const TLS& tls); void expand_permutation(IntList& permutation, const TLS& tls, Int8 alternative, std::size_t& domain_size); diff --git a/core/src/forbidden_permutation.cpp b/core/src/forbidden_permutation.cpp index 9db5e70..125a538 100644 --- a/core/src/forbidden_permutation.cpp +++ b/core/src/forbidden_permutation.cpp @@ -112,14 +112,14 @@ TLS ForbiddenPermutation::init_tls_by_scheme(const std::function& s return tls; } -TLS ForbiddenPermutation::assign_laws(TLS tls, const Tuple& tuple, const Laws laws) +TLS ForbiddenPermutation::assign_laws(TLS tls, const Tuple& tuple, const Laws& laws) { Int32 index = m_tuple_index[tuple]; tls[index].laws = laws; return tls; } -TLS ForbiddenPermutation::assign_laws_by_index(TLS tls, Int32 index, const Laws laws) +TLS ForbiddenPermutation::assign_laws_by_index(TLS tls, Int32 index, const Laws& laws) { tls[index].laws = laws; return tls;