<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "file://D:\PROGRA~1\scilab-4.0\man/manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>attack</TITLE>
  <TYPE>Scilab Function  </TYPE>
  <DATE>5-Sep-2006</DATE>
  <SHORT_DESCRIPTION name="attack">Simulate attack behaviors to the network model</SHORT_DESCRIPTION>

  <CALLING_SEQUENCE>
  <CALLING_SEQUENCE_ITEM>g = attack(g,t,flag)</CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>

  <PARAM>
  <PARAM_INDENT>

    <PARAM_ITEM>
    <PARAM_NAME>g</PARAM_NAME>
    <PARAM_DESCRIPTION>
	    <SP>
		    : graph list
     	    </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>t</PARAM_NAME>
    <PARAM_DESCRIPTION>
	    <SP>
		    : integer
     	    </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>flag</PARAM_NAME>
    <PARAM_DESCRIPTION>
	    <SP>
		    : integer (0,1,2)
     	    </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>

    <PARAM_ITEM>
    <PARAM_NAME>g</PARAM_NAME>
    <PARAM_DESCRIPTION>
	    <SP>
		    : graph list
     	    </SP>
    </PARAM_DESCRIPTION>
    </PARAM_ITEM>
  </PARAM_INDENT>
  </PARAM>
 
  <DESCRIPTION>
     <DESCRIPTION_INDENT>
     <DESCRIPTION_ITEM>
	     <P>
		     Simulate attack behaviors to the network model. g is the initial model, t is the attack time, flag is the scale factor which represents different attack strategies.
		     flag=0: attack one node randomly
		     flag=1: attack one link randomly
		     flag=2: attack one node with the maximum degree in every time step.
	     </P>
     </DESCRIPTION_ITEM>
     </DESCRIPTION_INDENT>
  </DESCRIPTION>

  <EXAMPLE><![CDATA[
	  [a b]=ba(6,4,9994);
	  g=make_graph('ba',0,10000,a,b);
	  t=tran(g('head'),g('tail'),g('node_number'));
	  disp(eff(t));
	  g=attack(g,10,2);
	  t=tran(g('head'),g('tail'),g('node_number'));
	  disp(eff(t));
	  ]]></EXAMPLE>

  <SEE_ALSO>
    <SEE_ALSO_ITEM> <LINK>eff</LINK> </SEE_ALSO_ITEM>
  </SEE_ALSO>

  <AUTHORS>
    <AUTHORS_ITEM label='Wubo'>
    </AUTHORS_ITEM>
  </AUTHORS>
</MAN>
