Allocates and initializes a decoder state
970174
def create(fs, channels):
    """"""

    result_code = ctypes.c_int()

    result = _create(fs, channels, ctypes.byref(result_code))
    if result_code.value is not 0:
        raise OpusError(result_code.value)

    return result
655649
function initializeStates()
    {
        // Set all states to NOT_READY
        var numVertices = graph.vertexCount();
        var vertexIds = graph.getVertexIds();

        for(var i = 0; i < numVertices; i++)
        {
            graph.getVertex(vertexIds[i]).setState("NOT_READY");
        }
    }
664473
def setStateCodes(self):    
        

        #calculate the statespace and determine the minima and maxima each element in the state vector     
        statespace      = self.statespace()     
        self.minvalues  = np.amin(statespace,axis=0)
        self.maxvalues  = np.amax(statespace,axis=0)
        
        #calculate the largest number of values and create a state code        
        statesize       = statespace.shape[1]  
        largestRange    = 1+np.max(self.maxvalues-self.minvalues) 
        self.statecode  = np.power(largestRange, np.arange(statesize),dtype=int) 
   
        #Calculate the codes, sort them, and store them in self.codes
        codes           = self.getStateCode(statespace)         
        sorted_indices  = np.argsort(codes)
        self.codes      = codes[sorted_indices]  
        if np.unique(self.codes).shape != self.codes.shape:
            raise "Non-unique coding of states, results are unreliable"
            
        #For the end results, it is useful to put the indices and corresponding states in a dictionary        
        mapping = OrderedDict()
        for index,state in enumerate(statespace[sorted_indices]):
            mapping[index]  = state    
            
        self.mapping        = mapping
411513
def _init_decoder(self):
        
        # Note: content-encoding value should be case-insensitive, per RFC 7230
        # Section 3.2
        content_encoding = self.headers.get('content-encoding', '').lower()
        if self._decoder is None and content_encoding in self.CONTENT_DECODERS:
            self._decoder = _get_decoder(content_encoding)
627070
private void initializeForRead(long rangeBeginning, long rangeEnd) throws IOException {
        // To get to the left-most byte desired by a user, we must skip over the 16 bytes of the
        // preliminary cipher block, and then possibly skip a few more bytes into the next block
        // to where the the left-most byte is located.
        int numBytesToSkip;
        if(rangeBeginning < JceEncryptionConstants.SYMMETRIC_CIPHER_BLOCK_SIZE) {
            numBytesToSkip = (int)rangeBeginning;
        } else {
            int offsetIntoBlock = (int)(rangeBeginning % JceEncryptionConstants.SYMMETRIC_CIPHER_BLOCK_SIZE);
            numBytesToSkip = JceEncryptionConstants.SYMMETRIC_CIPHER_BLOCK_SIZE + offsetIntoBlock;
        }
        if(numBytesToSkip != 0) {
            // Skip to the left-most desired byte.  The read() method is used instead of the skip() method
            // since the skip() method will not block if the underlying input stream is waiting for more input.
            while(numBytesToSkip > 0) {
                this.decryptedContents.read();
                numBytesToSkip--;
            }
        }
        // The number of bytes the user may read is equal to the number of the bytes in the range.
        // Note that the range includes the endpoints.
        this.virtualAvailable = (rangeEnd - rangeBeginning) + 1;
    }
463867
def init_state(self):
		'''  '''
		self.in_warc_response = False
		self.in_http_response = False
		self.in_payload = False
896623
function Decoder (opts) {
  if (!(this instanceof Decoder)) {
    return new Decoder(opts);
  }
  Transform.call(this, opts);
  var ret;

  ret = binding.mpg123_new(opts ? opts.decoder : null);
  if (Buffer.isBuffer(ret)) {
    this.mh = ret;
  } else {
    throw new Error('mpg123_new() failed: ' + ret);
  }

  ret = binding.mpg123_open_feed(this.mh);
  if (MPG123_OK != ret) {
    throw new Error('mpg123_open_feed() failed: ' + ret);
  }
  debug('created new Decoder instance');
}
633738
def _alloc(self):
        
        nzeros = [0] * self.n
        for var in self._states:
            self.__dict__[var] = nzeros[:]
        for var in self._algebs:
            self.__dict__[var] = nzeros[:]
913094
def initialize_state?(object)
      value = read(object, :state)
      (value.nil? || value.respond_to?(:empty?) && value.empty?) && !states[value, :value]
    end
210383
private void postInitialize() {
        if (log.isDebugEnabled()) {
            log.debug("FLVReader 1 - Buffer size: {} position: {} remaining: {}", new Object[] { getTotalBytes(), getCurrentPosition(), getRemainingBytes() });
        }
        if (getRemainingBytes() >= 9) {
            decodeHeader();
        }
        if (file != null) {
            keyframeMeta = analyzeKeyFrames();
        }
        long old = getCurrentPosition();
        log.debug("Position: {}", old);
    }
50754
def initialize(self, useRandomEncoder):
    
    self.setRandomSeed(self.seed)

    self.dim = numpy.shape(self.spatialConfig)[-1]

    self.spatialMap = dict( zip( map(tuple, list(self.spatialConfig)),
                              self.sensoryInputElements))

    self.lengthMotorInput1D = (2*self.maxDisplacement + 1) * \
                                                    self.numActiveBitsMotorInput

    uniqueSensoryElements = list(set(self.sensoryInputElementsPool))

    if useRandomEncoder:
      self.sensoryEncoder = SDRCategoryEncoder(n=1024,
                                w=self.numActiveBitsSensoryInput,
                                categoryList=uniqueSensoryElements,
                                forced=True)
      self.lengthSensoryInput = self.sensoryEncoder.getWidth()

    else:
      self.lengthSensoryInput = (len(self.sensoryInputElementsPool)+1) * \
                                          self.numActiveBitsSensoryInput

      self.sensoryEncoder = CategoryEncoder(w=self.numActiveBitsSensoryInput,
                            categoryList=uniqueSensoryElements, forced=True)

    motorEncoder1D =  ScalarEncoder(n=self.lengthMotorInput1D,
                                    w=self.numActiveBitsMotorInput,
                                    minval=-self.maxDisplacement,
                                    maxval=self.maxDisplacement,
                                    clipInput=True,
                                    forced=True)

    self.motorEncoder = VectorEncoder(length=self.dim, encoder=motorEncoder1D)
920135
@SuppressWarnings("unchecked")
    @Override
    public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
        this.callbackHandler = callbackHandler;
        this.subject = subject;
        this.sharedState = (Map<String, Object>) sharedState;
        this.options = options;
    }
330188
public synchronized void reset() {
        ensureOpen();
        encodedBuf.clear();
        if (decodedBuf.capacity() > FilteredConstants.DEFAULT_DECODER_CAPACITY) {
            this.decodedBuf = CharBuffer.allocate(FilteredConstants.DEFAULT_DECODER_CAPACITY);
        } else {
            decodedBuf.clear();
        }
        decoder.reset();
    }
975963
function init() {
    network = [];
    netindex = new Int32Array(256);
    bias = new Int32Array(netsize);
    freq = new Int32Array(netsize);
    radpower = new Int32Array(netsize >> 3);

    var i, v;
    for (i = 0; i < netsize; i++) {
      v = (i << (netbiasshift + 8)) / netsize;
      network[i] = new Float64Array([v, v, v, 0]);
      //network[i] = [v, v, v, 0]
      freq[i] = intbias / netsize;
      bias[i] = 0;
    }
  }
1257702
function readInit(message, tokens) {
	var i;
	message.parameters = {};
	for (i = 0; i < tokens.length; i = i + 4) {
		message.parameters[protocol.decodeString(tokens[i + 1])] = protocol.decodeString(tokens[i + 3]);
	}
}
1038546
private void resetStatesAfterDecode(final ChannelHandlerContext ctx) {
        if (traceEnabled) {
            LOGGER.trace("{}Finished decoding of {}", logIdent(ctx, endpoint), currentRequest);
        }
        currentRequest = null;
        currentDecodingState = DecodingState.INITIAL;
    }
1026966
private void initialDecodeTasks(final ChannelHandlerContext ctx) {
        currentRequest = sentRequestQueue.poll();
        currentDecodingState = DecodingState.STARTED;

        if (currentRequest != null) {
            Long st = sentRequestTimings.poll();
            if (st != null) {
                currentOpTime = System.nanoTime() - st;
            } else {
                currentOpTime = -1;
            }
        }

        if (env().operationTracingEnabled()) {
            Span dispatchSpan = dispatchSpans.poll();
            if (dispatchSpan != null) {
                currentDispatchSpan = dispatchSpan;
            }
        }

        if (traceEnabled) {
            LOGGER.trace("{}Started decoding of {}", logIdent(ctx, endpoint), currentRequest);
        }
    }