Detect a single core-periphery pair.
	
		Parameters
		----------
		G : NetworkX graph object
		
		Examples
		--------
		>>> import networkx as nx
		>>> import cpalgorithm as cpa
		>>> G = nx.karate_club_graph()  # load the karate club network. 
		>>> rb = cp.Rombach(algorithm='ls') # label switching algorithm
		>>> rb.detect(G)
		>>> rb = cp.Rombach(algorithm='sa') # simulated annealing  
		>>> rb.detect(G)

def detect(self, G):
		"""Detect a single core-periphery pair.
	
		Parameters
		----------
		G : NetworkX graph object
		
		Examples
		--------
		>>> import networkx as nx
		>>> import cpalgorithm as cpa
		>>> G = nx.karate_club_graph()  # load the karate club network. 
		>>> rb = cp.Rombach(algorithm='ls') # label switching algorithm
		>>> rb.detect(G)
		>>> rb = cp.Rombach(algorithm='sa') # simulated annealing  
		>>> rb.detect(G)

		"""
		
		Qbest = -100	
		cbest = 0 
		xbest = 0 
		qbest = 0 
		for i in range(self.num_runs):
			if self.algorithm == 'ls':
			
				self._label_switching(G, self.alpha, self.beta)
	
			elif self.algorithm == 'sa':
	
				self._simaneal(G, self.alpha, self.beta)
	
			if Qbest < self.Q_:
				Qbest = self.Q_	
				cbest = self.c_
				xbest = self.x_
				qbest = self.qs_
		
		self.Q_ = Qbest 	
		self.c_ = cbest 
		self.x_ = xbest 
		self.qs_ = qbest