Click here to Skip to main content
15,890,506 members
Home / Discussions / Java
   

Java

 
Question1) GenK-tree algorithm, 2) algorithm for > > inclusion-exclusion Using JGraphT ( Java Code) Pin
Mithun Suthar20-Sep-13 2:18
Mithun Suthar20-Sep-13 2:18 
AnswerRe: 1) GenK-tree algorithm, 2) algorithm for > > inclusion-exclusion Using JGraphT ( Java Code) Pin
Richard MacCutchan20-Sep-13 3:21
mveRichard MacCutchan20-Sep-13 3:21 
GeneralRe: 1) GenK-tree algorithm, 2) algorithm for > > inclusion-exclusion Using JGraphT ( Java Code) Pin
Mithun Suthar20-Sep-13 5:14
Mithun Suthar20-Sep-13 5:14 
Questionjava collection Pin
parisa6819-Sep-13 21:52
parisa6819-Sep-13 21:52 
AnswerRe: java collection Pin
Richard MacCutchan19-Sep-13 23:21
mveRichard MacCutchan19-Sep-13 23:21 
AnswerRe: java collection Pin
Mohini J.2-Oct-13 3:05
professionalMohini J.2-Oct-13 3:05 
AnswerRe: java collection Pin
Vivek Vermani13-Jan-14 12:01
Vivek Vermani13-Jan-14 12:01 
Questionpeersim simulator message passing Pin
parisa6819-Sep-13 6:41
parisa6819-Sep-13 6:41 
Hi,
i want to send message for other node's neighbors in peersim and i write protocol for node to do that for this job i send and receive messages using protocol's send and receive methods. an agent to send a message to her neighbor call put method of neighbor to do that .is it correct or no?
thanks,
it's my code for send and receivemessage.
//=======================Message handling=======================
//===============================================================
	public void clearinbix()
	{
		inbox.clear();
	}
	public void clearoutbox(){
		outbox.clear();
	}
	//for agent to get messages from inbox
	protected ArrayList<Message> getIncomingMessage()
	{
		ArrayList<Message> inmsg=(ArrayList<Message>)inbox.clone();
		tempMessages.addAll(inmsg);
		clearinbix();
		return inmsg;
		
		}
	//simulator to put messages in agent's inbox
	public void putMessage(Message msg)
	{
		inbox.add(msg);
		
	}
	//For agent to place a message in its own outbox
	protected void sendOutGoingMessage(Message msg,Node node)
	{
		msg.setSource(node);
		outbox.add(msg);
	}
	//For Simulator to collect messages in this Agent's outbox
	public ArrayList<Message> getMessages()
	{
		ArrayList<Message> outmsg=(ArrayList<Message>)outbox.clone();
		clearoutbox();
		return outmsg;
		
	}


modified 20-Sep-13 0:18am.

AnswerRe: peersim simulator message passing Pin
Richard MacCutchan19-Sep-13 21:20
mveRichard MacCutchan19-Sep-13 21:20 
GeneralRe: peersim simulator message passing Pin
parisa6819-Sep-13 21:44
parisa6819-Sep-13 21:44 
GeneralRe: peersim simulator message passing Pin
Richard MacCutchan19-Sep-13 22:03
mveRichard MacCutchan19-Sep-13 22:03 
QuestionPhp Pin
Member 1028500119-Sep-13 5:25
Member 1028500119-Sep-13 5:25 
AnswerRe: Php Pin
Richard MacCutchan19-Sep-13 21:03
mveRichard MacCutchan19-Sep-13 21:03 
AnswerRe: Php Pin
Usama Moud27-Sep-13 8:26
Usama Moud27-Sep-13 8:26 
Questionproblem with inheritance Pin
Asaf Shay18-Sep-13 1:59
Asaf Shay18-Sep-13 1:59 
QuestionRe: problem with inheritance Pin
Richard MacCutchan18-Sep-13 2:51
mveRichard MacCutchan18-Sep-13 2:51 
AnswerRe: problem with inheritance Pin
Asaf Shay19-Sep-13 9:17
Asaf Shay19-Sep-13 9:17 
GeneralRe: problem with inheritance Pin
jschell19-Sep-13 11:26
jschell19-Sep-13 11:26 
AnswerRe: problem with inheritance Pin
linaast18-Sep-13 20:38
linaast18-Sep-13 20:38 
GeneralRe: problem with inheritance Pin
Asaf Shay19-Sep-13 9:24
Asaf Shay19-Sep-13 9:24 
AnswerRe: problem with inheritance Pin
Mr_z22-Sep-13 10:36
Mr_z22-Sep-13 10:36 
AnswerRe: problem with inheritance Pin
Usama Moud27-Sep-13 9:36
Usama Moud27-Sep-13 9:36 
AnswerRe: problem with inheritance Pin
angrybobcat29-Sep-13 9:57
angrybobcat29-Sep-13 9:57 
AnswerRe: problem with inheritance Pin
Vivek Vermani13-Jan-14 12:04
Vivek Vermani13-Jan-14 12:04 
QuestionPlease Help with a Java code Pin
Adewagold16-Sep-13 22:01
Adewagold16-Sep-13 22:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.