<< atkTr_or Attack Tree atkTr_seq >>

Attack Tree >> Attack Tree > atkTr_saveDist

atkTr_saveDist

saves a tlist distribution in a text file.

Calling Sequence

atkTr_saveDist(dist,file)

Parameters

dist:

a tlist distribution

file:

filename

Description

saves a tlist distribution in a text file. The first line of the file is a comment line which contains the number of states. Otherwise each line contains a state and the probability of the state. A distribution saved in a file can be loaded with the function atkTr_loadDist.

Examples

X=tlist(['distribution','state','probability'],[2,9,15],[0.25,0.5,0.25])
atkTr_saveDist(X,'X')
// The file 'X' contains
// # 3
// 2.000000000000000e+00 2.500000000000000e-01
// 9.000000000000000e+00 5.000000000000000e-01
// 1.500000000000000e+01 2.500000000000000e-01

Report an issue
<< atkTr_or Attack Tree atkTr_seq >>