PEATSA/Core/Environment.py
def _divideArray(self, array):
	
		'''Divides an array roughly equally depending on the environment size
		
		Returns: A list with one entry for each node.
		The entry is a tuple giving the start and end elements in array 
		that should be assigned to that node.'''
	
		import pypar
	
		#Divide evenly then add remainder elements to processors
		maxElements = int(math.floor(len(array)/pypar.size()))
		remainder = len(array) - maxElements*pypar.size()
		start = 0
		end = 0
		divisions = []
		for i in range(pypar.size()):
			start = end
			end = end + maxElements
			if remainder != 0:
				end = end + 1
				remainder = remainder - 1
			divisions.append((start, end))
			
		return divisions
Divides an array roughly equally depending on the environment size
		
		Returns: A list with one entry for each node.
		The entry is a tuple giving the start and end elements in array 
		that should be assigned to that node.
Divides an array roughly equally depending on the environment size
Returns: A list with one entry for each node.
The entry is a tuple giving the start and end elements in array
that should be assigned to that node.
Divides an array roughly equally depending on the environment size Returns : A list with one entry for each node . The entry is a tuple giving the start and end elements in array that should be assigned to that node .
def _divideArray(self, array):
		import pypar
		maxElements = int(math.floor(len(array)/pypar.size()))
		remainder = len(array) - maxElements*pypar.size()
		start = 0
		end = 0
		divisions = []
		for i in range(pypar.size()):
			start = end
			end = end + maxElements
			if remainder != 0:
				end = end + 1
				remainder = remainder - 1
			divisions.append((start, end))
		return divisions
def _divideArray ( self , array ) : import pypar maxElements = int ( math . floor ( len ( array ) / pypar . size ( ) ) ) remainder = len ( array ) - maxElements * pypar . size ( ) start = 0 end = 0 divisions = [ ] for i in range ( pypar . size ( ) ) : start = end end = end + maxElements if remainder != 0 : end = end + 1 remainder = remainder - 1 divisions . append ( ( start , end ) ) return divisions
Divides an array roughly equally depending on the environment size
Returns: A list with one entry for each node.
Divides an array roughly equally depending on the environment size Returns : A list with one entry for each node .
'''Divides an array roughly equally depending on the environment size
		
		Returns: A list with one entry for each node.
		The entry is a tuple giving the start and end elements in array 
		that should be assigned to that node.''' #Divide evenly then add remainder elements to processors
self
array