Ejemplo n.º 1
0
	def toBool(self):
		"""
		converts the HyGraph instance in-place such that each edge has only
		a Boolean (True) value, thereby consuming less space and making
		some operations faster.

		Input Argument:
			self:  a HyGraph instance that is overwritten by the method

		Output Argument:
			None.
		"""
		if isinstance(self._spm, pcb.pySpParMat):
			self._spm  = pcb.pySpParMatBool(self._spm)
			self._spmT = pcb.pySpParMatBool(self._spmT)
Ejemplo n.º 2
0
	# spec test #4
	#	Not implemented

	# spec test #5
	#	Not implemented

	

	del G, parents, parents2, fringe, levels, tmp1, tmp2, treeEdges, treeI, treeJ
	
	return ret

###############################################
###########    MATRIX CREATION

A = pcb.pySpParMatBool()
scale = 10

#degrees = pcb.pyDenseParVec(4, 0);
k1time = 0.0

if len(sys.argv) >= 2:
	scale = int(sys.argv[1])

if (scale < 0):
	if len(sys.argv) >= 3:
		path = sys.argv[2]
	else:
		print "Expecting a path to a matrix file as argument."
		sys.exit();