easyvvuq.encoders.multiencoder

 1import logging
 2
 3__copyright__ = """
 4
 5    Copyright 2018 Robin A. Richardson, David W. Wright
 6
 7    This file is part of EasyVVUQ
 8
 9    EasyVVUQ is free software: you can redistribute it and/or modify
10    it under the terms of the Lesser GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13
14    EasyVVUQ is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    Lesser GNU General Public License for more details.
18
19    You should have received a copy of the Lesser GNU General Public License
20    along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
22"""
23__license__ = "LGPL"
24
25logger = logging.getLogger(__name__)
26
27
28class MultiEncoder:
29
30    def __init__(self, *encoders):
31        """
32            Expects one or more encoders
33        """
34        self.encoders = encoders
35
36    def encode(self, params={}, target_dir=''):
37        """
38            Applies all encoders in the list of encoders.
39        """
40        for encoder in self.encoders:
41            encoder.encode(params=params, target_dir=target_dir)
42
43    def is_restartable(self):
44        return True
logger = <Logger easyvvuq.encoders.multiencoder (DEBUG)>
class MultiEncoder:
29class MultiEncoder:
30
31    def __init__(self, *encoders):
32        """
33            Expects one or more encoders
34        """
35        self.encoders = encoders
36
37    def encode(self, params={}, target_dir=''):
38        """
39            Applies all encoders in the list of encoders.
40        """
41        for encoder in self.encoders:
42            encoder.encode(params=params, target_dir=target_dir)
43
44    def is_restartable(self):
45        return True
MultiEncoder(*encoders)
31    def __init__(self, *encoders):
32        """
33            Expects one or more encoders
34        """
35        self.encoders = encoders

Expects one or more encoders

encoders
def encode(self, params={}, target_dir=''):
37    def encode(self, params={}, target_dir=''):
38        """
39            Applies all encoders in the list of encoders.
40        """
41        for encoder in self.encoders:
42            encoder.encode(params=params, target_dir=target_dir)

Applies all encoders in the list of encoders.

def is_restartable(self):
44    def is_restartable(self):
45        return True