(self, in_obj)
Determine dimensions of cost and error buffers and allocate space from the input layer

        Arguments:
            in_obj (Layer): input layer from which to calculate costs
Determine dimensions of cost and error buffers and allocate space from the input layer
Determine dimensions of cost and error buffers and allocate space from the input layer
def initialize(self, in_obj):
        """
        Determine dimensions of cost and error buffers and allocate space from the input layer

        Arguments:
            in_obj (Layer): input layer from which to calculate costs
        """
        if isinstance(in_obj, LayerContainer):
            terminals = in_obj.get_terminal()
        elif isinstance(in_obj, list):
            terminals = in_obj
        else:
            raise RuntimeError("Multicost must be passed a container or list")

        for c, ll in zip(self.costs, terminals):
            c.initialize(ll)
def initialize ( self , in_obj ) : if isinstance ( in_obj , LayerContainer ) : terminals = in_obj . get_terminal ( ) elif isinstance ( in_obj , list ) : terminals = in_obj else : raise RuntimeError ( "Multicost must be passed a container or list" ) for c , ll in zip ( self . costs , terminals ) : c . initialize ( ll )