Finalise the graph, after adding all input files to it.
518277
def build(self):
        """"""

        assert not self.final, 'Trying to mutate a final graph.'

        # Replace each strongly connected component with a single node `NodeSet`
        for scc in sorted(nx.kosaraju_strongly_connected_components(self.graph),
                          key=len, reverse=True):
            if len(scc) == 1:
                break

            self.shrink_to_node(NodeSet(scc))

        self.final = True
10433
public function finish()
    {
        $this->resolveRelations();
        $this->writeXmlFiles();
        $this->createTables();
        $this->import();
        $this->writeExtensionIni();
    }
439988
public function finalize()
    {
        // Output our chunks.
        // Every output is split into 4 chunk strings (header, messages,
        // data, footer).
        foreach ($this->chunkStrings as $chunkString) {
            // Save everything to the file after we are done.
            $this->pool->chunks->saveDechunkedToFile($chunkString);
        }
    }
111555
def finalize(self):
        
        logger.debug("Finalizing: {}".format(self))
        self.plotItem.scene().sigMouseMoved.disconnect(self.mouseMoved)
        self.plotItem.close()
        self.graphicsLayoutWidget.close()
104406
def finalize_options(self):
        
        self.cwd = os.path.abspath(os.path.dirname(__file__))
        self.test_dir = os.path.join(self.cwd, 'tests')
567697
def process_input_graph(func):
    """"""
    @wraps(func)
    def wrapped_func(*args, **kwargs):
        input_graph = args[0]
        if isinstance(input_graph, nx.DiGraph):
            return func(*args, **kwargs)
        else:
            nx_graph = dict_to_nx(args[0], oriented=True)
            args = [nx_graph] + list(args[1:])
            return func(*args, **kwargs)
    return wrapped_func
912378
function complete() {
  quit();

  const deleteQueue = [];
  fs.readdir(paths.output, (err, files) => {
    if (files) {
      // lookup array for quick search inside existing component names
      const componentsLookup = components.map(item => {
        return slugify(item.meta.name);
      });

      // loop over files
      for (let i = 0, l = files.length; i < l; ++i) {
        const file = files[i];
        const ext = path.extname(file);

        // ignore dot files
        if (file.indexOf(".") === 0) {
          continue;
        }

        // if json+html file isn't inside lookup, mark for deletion
        if (componentsLookup.indexOf(path.basename(file, ext)) === -1) {
          deleteQueue.push(file);
        }
      }
    }

    // remove file by passing shorter queue
    function removeFile(q) {
      if (!q.length) {
        process.send(true);
        return;
      }

      const file = q.shift();
      rimraf(path.resolve(paths.output, file), { read: false }, () => {
        removeFile(q);
      });
    }

    removeFile(deleteQueue);
  });
}
1031015
protected void computeOutput() {
		outputRegionId.reset();
		outputRegionSizes.reset();
		for( int y = 0; y < graph.height; y++ ) {
			int indexGraph = graph.startIndex + y*graph.stride;
			for( int x = 0; x < graph.width; x++ , indexGraph++) {
				int parent = graph.data[indexGraph];
				if( parent == indexGraph ) {
					outputRegionId.add(indexGraph);
					outputRegionSizes.add(regionSize.get(indexGraph));
				} else {
					// find the parent and set the child to it
					int child = indexGraph;
					while( parent != child ) {
						child = parent;
						parent = graph.data[child];
					}
					graph.data[indexGraph] = parent;
				}
			}
		}
	}
971554
protected void finishAdding()
    {
        noMoreAdding = true;
        
        workSpace = null;
        storageSpace = null;
        wordCounts = null;
        
        final int[] frqs = new int[dimensionSize];
        for(int i = 0; i < termDocumentFrequencys.length(); i++)
            frqs[i] = termDocumentFrequencys.get(i);
        weighting.setWeight(vectors, IntList.unmodifiableView(frqs, dimensionSize));
        for(SparseVector vec : vectors)
            weighting.applyTo(vec);
        termDocumentFrequencys = null;
    }
532002
def init_graph(self):
        
        self._graph = Graph()

        # First add all nodes
        for key in self.loader.disk_fixtures.keys():
            self.graph.add_node(key)

        # Then set dependencies
        for key, fixture in self.loader.disk_fixtures.items():
            for dependency in fixture.dependencies:
                self.graph.add_dependency(key, dependency)
978144
private void finalization() {
        Map<String, Object> dataModel = newHashMap();
        dataModel.put("cppFormatter", new SourceFormatter());
        Set<ClassModel> dependencies = newHashSet();
        for (Java4CppType type : context.getClassesAlreadyDone()) {
            Class<?> clazz = type.getRawClass();
            if (isValid(clazz)) {
                dependencies.add(context.getClassModel(clazz));
            }
        }
        dataModel.put("classes", dependencies);
        dataModel.put("symbols", context.getFileManager().getSymbols().getSymbols());

        context.getTemplateManager().processGlobalTemplates(dataModel);

        context.getTemplateManager().copyFiles();
    }
424611
public function finalize()
    {
        $this->addItem(new MainMenu());

        if (get_class(\Ease\Shared::user()) == 'SpojeNet\System\User') {
            $this->addItem(new History());
        }
    }
951328
def finish(self):
        """"""

        # Combine all the suffix files into the data file.
        self.cov.stop()
        self.cov.combine()
        self.cov.save()
1305046
def make_complete(self):
        
        # reset the site indices from 0 to N-1 and set self.complete to self
        self.array['sids'] = numpy.arange(len(self), dtype=numpy.uint32)
        self.complete = self
217626
public void finalizeScript() {
		if (this.isFinalized) {
			throw new IllegalStateException("already finalized");
		}
		this.isFinalized = true;
		ImportManager concreteImports = new ImportManager(true);
		XImportSection importSection = getScript().getImportSection();
		if (importSection != null) {
			for (XImportDeclaration decl : importSection.getImportDeclarations()) {
				concreteImports.addImportFor(decl.getImportedType());
			}
		}
		for (String importName : getImportManager().getImports()) {
			JvmType type = findType(getScript(), importName).getType();
			if (concreteImports.addImportFor(type) && type instanceof JvmDeclaredType) {
				XImportDeclaration declaration = XtypeFactory.eINSTANCE.createXImportDeclaration();
				declaration.setImportedType((JvmDeclaredType) type);
				if (importSection == null) {
					importSection = XtypeFactory.eINSTANCE.createXImportSection();
					getScript().setImportSection(importSection);
				}
				importSection.getImportDeclarations().add(declaration);
			}
		}
		Resource resource = getScript().eResource();
		if (resource instanceof DerivedStateAwareResource) {
			((DerivedStateAwareResource) resource).discardDerivedState();
		}
	}
982628
def add_file(self, filename):
        """"""

        assert not self.final, 'Trying to mutate a final graph.'
        self.add_source_file(filename)
        resolved, unresolved = self.get_file_deps(filename)
        self.graph.add_node(filename)
        for f in resolved:
            self.graph.add_node(f)
            self.graph.add_edge(filename, f)
        for imp in unresolved:
            self.broken_deps[filename].add(imp)
297977
def main(graph):
    
    args = parse_args(graph)

    if args.drop:
        drop_all(graph)
    create_all(graph)