Creates the complete array for the sample rate mapping.

@return the table for the sample rates
970648
private static int[][] createSampleRateTable() {
        int[][] arr = new int[4][];
        arr[AudioFrame.MPEG_V1] = SAMPLE_RATE_MPEG1;
        arr[AudioFrame.MPEG_V2] = SAMPLE_RATE_MPEG2;
        arr[AudioFrame.MPEG_V2_5] = SAMPLE_RATE_MPEG2_5;
        return arr;
    }
963433
public Table cloneTable()
    {
        Table ret = null;
        try {
            ret = (Table) super.clone();
        } catch (final CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return ret;
    }
68522
public float[][] getTheta() {
        float[][] theta = new float[documents.length][K];

        if (SAMPLE_LAG > 0) {
            for (int m = 0; m < documents.length; m++) {
                for (int k = 0; k < K; k++) {
                    theta[m][k] = thetasum[m][k] / numstats;
                }
            }

        } else {
            for (int m = 0; m < documents.length; m++) {
                for (int k = 0; k < K; k++) {
                    theta[m][k] = (nd[m][k] + alpha) / (ndsum[m] + K * alpha);
                }
            }
        }

        return theta;
    }
503688
public String[] getAllColumns() {
        if (cachedAllColumns == null) {
            cachedAllColumns = new ArrayList<String>(getColumnAttributeMappings().keySet())
                    .toArray(ArrayUtils.EMPTY_STRING_ARRAY);
        }
        return cachedAllColumns;
    }
764049
public Table createTable(CreateTableRequest req) {
        CreateTableResult result = client.createTable(req);
        return new Table(client, req.getTableName(),
            result.getTableDescription());
    }
841131
public function getTables()
    {
        $options = $this->getOptions();
        $tables = [];

        foreach ($this->fetchAll(sprintf("select name from sqlite_master where type = 'table'")) as $row) {
            if ($row[0] == 'sqlite_sequence') continue;

            $table = new Table($row[0], [], $this);
            $tables[] = $table;
            $options = [];

            $describes = $this->fetchAll(sprintf('PRAGMA table_info(%s)', $this->quoteTableName($table->getName())));
            $primary_keys = [];
            foreach ($describes as $describe) {
                if ($describe['pk'] === '1') {
                    $primary_keys[] = $describe['name'];
                }
            }

            if (! $primary_keys || (count($primary_keys) === 1 && $primary_keys[0] === 'id')) {
            }

            // $this->table('foo', ['id' => 'foo_id']);
            elseif (count($primary_keys) === 1 && $primary_keys[0] !== 'id') {
                $options = ['id' => $primary_keys[0]];
            } else {
                $options = ['id' => false, 'primary_key' => $primary_keys];
            }

            $table->setOptions($options);
        }

        return $tables;
    }
786389
protected State getRuntimePropsEnrichedTblProps() {
    State tableProps = new State(this.props.getTablePartitionProps());
    if (this.props.getRuntimeTableProps().isPresent()){
      tableProps.setProp(HiveMetaStoreUtils.RUNTIME_PROPS, this.props.getRuntimeTableProps().get());
    }
    return tableProps;
  }
1022837
public Block[] createBlockForStateMap() {
        Block[] map = new Block[numStates];
        for (Block b = blocklistHead; b != null; b = b.nextBlock) {
            int low = b.low, high = b.high;
            for (int i = low; i < high; i++) {
                int state = blockData[i];
                map[state] = b;
            }
        }
        return map;
    }
806421
@Override
    public Object createExample() {
        MetricDto result = new MetricDto();
        Map<Long, Double> dps = new TreeMap<>();

        dps.put(System.currentTimeMillis(), 1.2);
        result.setDatapoints(dps);
        result.setDisplayName("A description of the metric");
        result.setMetric("metric");
        result.setScope("scope");

        Map<String, String> sampleTags = new HashMap<>();

        sampleTags.put("tagk", "tagv");
        result.setTags(sampleTags);
        result.setUnits("ms");
        return result;
    }
1017446
public SimpleDataSet generateData(int samples)
    {
        int totalClasses = 1;
        for(int d : dimensions)
            totalClasses *= d;
        catDataInfo = new CategoricalData[] { new CategoricalData(totalClasses) } ;
        List<DataPoint> dataPoints = new ArrayList<DataPoint>(totalClasses*samples);
        int[] curClassPointer = new int[1];
                
        for(int i = 0; i < dimensions[0]; i++)
        {
            int[] curDim = new int[dimensions.length];
            curDim[0] = i;
            addSamples(curClassPointer, 0, samples, dataPoints, curDim);
        }
        
        return new SimpleDataSet(dataPoints);
    }
597166
public double[] getInterleavedSamples() {
        double[] samples = new double[(int) getSampleCount()];
        try {
            getInterleavedSamples(0, getSampleCount(), samples);
        } catch (IllegalArgumentException | IOException e) {
            e.printStackTrace();
        }

        return samples;
    }
450091
public function makeTableMapDTO()
    {
        $data = [];
        $data['table_id'] = $this->binaryDataReader->readTableId();
        $this->binaryDataReader->advance(2);
        $data['schema_length'] = $this->binaryDataReader->readUInt8();
        $data['schema_name'] = $this->binaryDataReader->read($data['schema_length']);

        if (Config::checkDataBasesOnly($data['schema_name'])) {
            return null;
        }

        $this->binaryDataReader->advance(1);
        $data['table_length'] = $this->binaryDataReader->readUInt8();
        $data['table_name'] = $this->binaryDataReader->read($data['table_length']);

        if (Config::checkTablesOnly($data['table_name'])) {
            return null;
        }

        $this->binaryDataReader->advance(1);
        $data['columns_amount'] = $this->binaryDataReader->readCodedBinary();
        $data['column_types'] = $this->binaryDataReader->read($data['columns_amount']);

        if ($this->cache->has($data['table_id'])) {
            return new TableMapDTO($this->eventInfo, $this->cache->get($data['table_id']));
        }

        $this->binaryDataReader->readCodedBinary();

        $columns = $this->repository->getFields($data['schema_name'], $data['table_name']);

        $fields = [];
        // if you drop tables and parse of logs you will get empty scheme
        if (!empty($columns)) {
            $columnLength = strlen($data['column_types']);
            for ($i = 0; $i < $columnLength; ++$i) {
                // this a dirty hack to prevent row events containing columns which have been dropped
                if (!isset($columns[$i])) {
                    $columns[$i] = [
                        'COLUMN_NAME' => 'DROPPED_COLUMN_' . $i,
                        'COLLATION_NAME' => null,
                        'CHARACTER_SET_NAME' => null,
                        'COLUMN_COMMENT' => null,
                        'COLUMN_TYPE' => 'BLOB',
                        'COLUMN_KEY' => ''
                    ];

                    $type = ConstFieldType::IGNORE;
                } else {
                    $type = ord($data['column_types'][$i]);
                }

                $fields[$i] = Columns::parse($type, $columns[$i], $this->binaryDataReader);
            }
        }

        $tableMap = new TableMap(
            $data['schema_name'],
            $data['table_name'],
            $data['table_id'],
            $data['columns_amount'],
            $fields
        );

        $this->cache->set($data['table_id'], $tableMap);

        return new TableMapDTO($this->eventInfo, $tableMap);
    }
1350595
public Object[] toArrayCached() {
        Object[] readCacheArray = generatedCacheMap.values().toArray();
        Object[] writeCacheArray = resultSetCacheMap.values().toArray();

        Object[] combinedCacheArray = new Object[readCacheArray.length + writeCacheArray.length];

        System.arraycopy(readCacheArray, 0, combinedCacheArray, 0, readCacheArray.length);
        System.arraycopy(writeCacheArray, 0, combinedCacheArray, readCacheArray.length, writeCacheArray.length);

        return combinedCacheArray;
    }
346249
private function buildConversionTable()
    {
        if ($this->source->getRadix() > $this->target->getRadix()) {
            return $this->createTable($this->source->getDigitList(), $this->target->getDigitList());
        }

        return array_flip($this->createTable($this->target->getDigitList(), $this->source->getDigitList()));
    }
748884
public Table<Entity<T>> getOrCreateTable()
   {
      Node node = childNode.getOrCreate("table");
      Table<Entity<T>> table = new TableImpl<Entity<T>>(this, "table", childNode, node);
      return table;
   }
1304078
public function createAllGeneratorTables()
    {
        $tables = [];

        /**
         * @var ClassMetadata $class
         */
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            $tables = array_merge(
                $tables,
                $this->getGeneratorTablesFor($class)
            );
        }

        foreach ($tables as $tableName => $definition) {
            $this->doCreateTable($tableName, $definition);
        }
    }
439888
private List<String> getFedoraTables() {
        try {
            InputStream in =
                    getClass().getClassLoader()
                            .getResourceAsStream(DBSPEC_LOCATION);
            List<TableSpec> specs = TableSpec.getTableSpecs(in);
            ArrayList<String> names = new ArrayList<String>();
            for (TableSpec spec: specs) {
                names.add(spec.getName().toUpperCase());
            }
            return names;
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("Unexpected error reading dbspec file",
                                       e);
        }
    }