From 76c8993c0e5a4cab6a63d838cc3653c4e5ef82bf Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 20 Nov 2008 09:44:40 +0100 Subject: [PATCH] src/sn_network.[ch]: Implement `sn_network_shift'. --- src/sn_network.c | 10 ++++++++++ src/sn_network.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/sn_network.c b/src/sn_network.c index 4dfd6d7..a1ada08 100644 --- a/src/sn_network.c +++ b/src/sn_network.c @@ -175,6 +175,16 @@ int sn_network_invert (sn_network_t *n) /* {{{ */ return (0); } /* }}} int sn_network_invert */ +int sn_network_shift (sn_network_t *n, int sw) /* {{{ */ +{ + int i; + + for (i = 0; i < n->stages_num; i++) + sn_stage_shift (n->stages[i], sw, SN_NETWORK_INPUT_NUM (n)); + + return (0); +} /* }}} int sn_network_shift */ + int sn_network_compress (sn_network_t *n) /* {{{ */ { int i; diff --git a/src/sn_network.h b/src/sn_network.h index 905097d..3af9c72 100644 --- a/src/sn_network.h +++ b/src/sn_network.h @@ -51,6 +51,7 @@ int sn_network_brute_force_check (sn_network_t *n); int sn_network_show (sn_network_t *n); int sn_network_invert (sn_network_t *n); +int sn_network_shift (sn_network_t *n, int s); int sn_network_compress (sn_network_t *n); int sn_network_normalize (sn_network_t *n); -- 2.11.0