How to use the networkit.profiling.job.Job function in networkit

To help you get started, we’ve selected a few networkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github networkit / networkit / networkit / profiling / stat.py View on Github external
# continue
					# z = float("Inf")
					# break
				# d = absoluteFrequencies[i] - hypotheticAbsoluteFrequency
				# z += d*d / hypotheticAbsoluteFrequency
				# print(self.getName(), hypotheticAbsoluteFrequency, absoluteFrequencies[i], z)
			# degreesOfFreedom = (k_Bins - 1) - numberOfUsedEstimators
			# pValue = funcPValue(z, degreesOfFreedom)
			# return (z, pValue)
		# results["Distribution"]["Chi-Square-Test (Normal)"] = funcChiSquaredTest(funcDistributionNormal, 2)
		# results["Distribution"]["Chi-Square-Test (Exponential)"] = funcChiSquaredTest(funcDistributionExponential, 1)

		return results


class Correlation(job.Job):
	""" correlation computation object """
	
	def __init__(self, name, params):
		""" constructor: see PlotJob and .run() """
		job.Job.__init__(
			self,
			"Correlation",
			name
		)
		self.__params = params

		
	def run(self):
		""" computation """
		(nameB, sample_1, sampleRanked_1, stat_1, sample_2, sampleRanked_2, stat_2) = self.__params
		n = len(sample_1)
github networkit / networkit / networkit / profiling / plot.py View on Github external
def __init__(self, typename, plottype, options, name, params):
		""" constructor 
		
		Arg:
			typename: job type name
			plottype: "SVG" / "PDF"
			options: format dependent
			name: name of the measure
			params: a tuple of additional parameters
		"""
		job.Job.__init__(
			self,
			typename,
			name
		)
		self.__plottype = plottype
		self.__options = options
		self.__params = params
github networkit / networkit / networkit / profiling / stat.py View on Github external
def __init__(self, name, params):
		""" constructor: see PlotJob and .run() """
		job.Job.__init__(
			self,
			"Correlation",
			name
		)
		self.__params = params
github networkit / networkit / networkit / profiling / stat.py View on Github external
import matplotlib.pyplot as plt
except ImportError:
	have_plt = False
else:
	have_plt = True

from _NetworKit import sort2
from _NetworKit import ranked

from ..support import MissingDependencyError

def sorted(sample):
	"""	returns a sorted list of given numbers """
	return sort2(sample)

class Stat(job.Job):
	""" statistical computation object """
	
	def __init__(self, name, params):
		""" constructor: see PlotJob and .run() """
		job.Job.__init__(
			self,
			"Stat",
			name
		)
		self.__params = params

	def run(self):
		""" computation """
		(sample, sampleSorted, sampleRanked, calculatePie) = self.__params
		n = len(sample)
github networkit / networkit / networkit / profiling / plot.py View on Github external
def getGridColor(self):
		""" returns the grid color value of the theme """
		return self.__gridColor
		
		
	def getFontSize(self):
		""" returns the font size value of the theme """
		return self.__fontSize
		
		
	def getFontColor(self):
		""" returns the font color value of the theme """
		return self.__fontColor

		
class PlotJob(job.Job):
	def __init__(self, typename, plottype, options, name, params):
		""" constructor 
		
		Arg:
			typename: job type name
			plottype: "SVG" / "PDF"
			options: format dependent
			name: name of the measure
			params: a tuple of additional parameters
		"""
		job.Job.__init__(
			self,
			typename,
			name
		)
		self.__plottype = plottype
github networkit / networkit / networkit / profiling / stat.py View on Github external
def __init__(self, name, params):
		""" constructor: see PlotJob and .run() """
		job.Job.__init__(
			self,
			"Stat",
			name
		)
		self.__params = params