Initializes the given {@code indexes} array.

@param indexes the indexes array to initialize
@return the initialized indexes array
@throws NullPointerException if the given {@code indexes} array is
{@code null}
349276
public static int[] init(final int[] indexes) {
		for (int i = 0; i < indexes.length; ++i) {
			indexes[i] = i;
		}
		return indexes;
	}
1053936
public Object get (Object array, int index)
    {
        return (array == null) ? null : Array.get(array, index);
    }
1365415
public void init() {
        surnameIndex.clear();

        final RootVisitor visitor = new RootVisitor();
        mRoot.accept(visitor);
        for (final Person person : visitor.getPersons()) {
            final String key = person.getString();
            // Surname for inclusion in the index.
            // This is the string by which the person will be indexed.
            final String indexName = person.getIndexName();

            if (!indexName.isEmpty()) {
                final SortedMap<String, SortedSet<String>> names =
                        findNamesPerSurname(person.getSurname());
                final SortedSet<String> ids = findIdsPerName(indexName, names);
                ids.add(key);
            }
        }
    }
819957
public void init(Sort sort) {
        Log.debug("Initializing index");
        try {
            this.sort = sort;

            // Get directory file
            file = new File(path);

            // Open or create directory
            FSDirectory fsDirectory = FSDirectory.open(file);
            directory = new NRTCachingDirectory(fsDirectory, maxMergeMB, maxCachedMB);

            // Setup index writer
            IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_48, analyzer);
            config.setRAMBufferSizeMB(ramBufferMB);
            config.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);
            config.setUseCompoundFile(true);
            config.setMergePolicy(new SortingMergePolicy(config.getMergePolicy(), sort));
            indexWriter = new IndexWriter(directory, config);

            // Setup NRT search
            SearcherFactory searcherFactory = new SearcherFactory() {
                public IndexSearcher newSearcher(IndexReader reader) throws IOException {
                    IndexSearcher searcher = new IndexSearcher(reader);
                    searcher.setSimilarity(new NoIDFSimilarity());
                    return searcher;
                }
            };
            TrackingIndexWriter trackingIndexWriter = new TrackingIndexWriter(indexWriter);
            searcherManager = new SearcherManager(indexWriter, true, searcherFactory);
            searcherReopener = new ControlledRealTimeReopenThread<>(trackingIndexWriter,
                                                                    searcherManager,
                                                                    refreshSeconds,
                                                                    refreshSeconds);
            searcherReopener.start(); // Start the refresher thread
        } catch (IOException e) {
            Log.error(e, "Error while initializing index");
            throw new RuntimeException(e);
        }
    }
255744
@Override
    public INDArray get(INDArrayIndex... indexes) {

        sort();

        if (indexes.length == 1 && indexes[0] instanceof NDArrayIndexAll || (indexes.length == 2 && (isRowVector()
                        && indexes[0] instanceof PointIndex && indexes[0].offset() == 0
                        && indexes[1] instanceof NDArrayIndexAll
                        || isColumnVector() && indexes[1] instanceof PointIndex && indexes[0].offset() == 0
                                        && indexes[0] instanceof NDArrayIndexAll)))
            return this;

        throw new UnsupportedOperationException("Not implemented");
    }
843592
public JSONArray getArray(int index) {
        Object tmp = mArray.get(index);
        return tmp == null ? null : tmp instanceof JSONArray ? (JSONArray) tmp
                : null;
    }
116915
public void setIndexedAttributes(java.util.Collection<AttributeKeyAndValue> indexedAttributes) {
        if (indexedAttributes == null) {
            this.indexedAttributes = null;
            return;
        }

        this.indexedAttributes = new java.util.ArrayList<AttributeKeyAndValue>(indexedAttributes);
    }
1226471
@Override
    public Array getArray(int index) {
        synchronized (lock) {
            final Object obj = getMValue(internalArray, index).asNative(internalArray);
            return obj instanceof Array ? (Array) obj : null;
        }
    }
1110861
public static <T> List<T> slice(List<T> list, int... indexes) {
		List<T> slice = new ArrayList<>(indexes.length);
		for (int i : indexes) {
			slice.add(list.get(i));
		}
		return slice;
	}
48514
@NonNull
  public static CreateIndexStart createIndex(@Nullable String indexName) {
    return createIndex(indexName == null ? null : CqlIdentifier.fromCql(indexName));
  }
152789
public void setRangesOnIndexedValues(java.util.Collection<ObjectAttributeRange> rangesOnIndexedValues) {
        if (rangesOnIndexedValues == null) {
            this.rangesOnIndexedValues = null;
            return;
        }

        this.rangesOnIndexedValues = new java.util.ArrayList<ObjectAttributeRange>(rangesOnIndexedValues);
    }
519824
public Collection<LocalSecondaryIndex> localSecondaryIndexes() {
        if (localSecondaryIndexes.isEmpty()) {
            return null;
        }
        final Collection<LocalSecondaryIndex> copies = new ArrayList<LocalSecondaryIndex>(localSecondaryIndexes.size());
        for (final String indexName : localSecondaryIndexes.keySet()) {
            copies.add(localSecondaryIndex(indexName));
        }
        return copies;
    }
1184569
private void indexArrayStore(int e, int i)
    {
        if (valueIndexStore.length < e)
        {
            int oldLength = valueIndexStore.length;
            valueIndexStore = Arrays.copyOf(valueIndexStore, e + 2);
            Arrays.fill(valueIndexStore, oldLength, valueIndexStore.length, -1);
        }
        valueIndexStore[e] = i;
    }
665067
public void initialize( int numFeatures , int numViews ) {
		depths.reshape(numViews,numFeatures);
		pixels.reshape(numViews*2,numFeatures);
		pixelScale = 0;
	}
1021461
public void setRows(java.util.Collection<Row> rows) {
        if (rows == null) {
            this.rows = null;
            return;
        }

        this.rows = new java.util.ArrayList<Row>(rows);
    }
596102
public void getTablesAndIndexes(Map<String, StmtTargetTableScan> tablesRead,
            Collection<String> indexes)
    {
        for (AbstractPlanNode node : m_inlineNodes.values()) {
            node.getTablesAndIndexes(tablesRead, indexes);
        }
        for (AbstractPlanNode node : m_children) {
            node.getTablesAndIndexes(tablesRead, indexes);
        }
        getTablesAndIndexesFromSubqueries(tablesRead, indexes);
    }
1018566
@Override
	public void init(String jsonString) throws IndexerException {
		try {
			config = new JsonSimpleConfig(jsonString);
			init();
		} catch (IOException e) {
			throw new IndexerException(e);
		}
	}