Description Usage Arguments Value Author(s) Examples
Loads previously computed hat function from file name(string)
1 | ranlip.LoadPartition(string)
|
string |
The file name to read saved partition from |
output |
The output is 0 if the function was successful, or: 2 if the file cannot be opened, 3 if file is corrupted, 4 if memory cannot be allocated |
Gleb Beliakov, Daniela L. Calderon, Deakin University
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Fn <- function(x,dim){
out <- sum(exp(-x))
return(out)
}
out<-ranlip.LoadPartition("mypartition.txt")
if(out>0) {
print("Error loading hat function. ")
err<-switch(out,"Unknown","Fice cannot be opened",
"File is corrupted","Memory not allocated")
print(err)
} else {
r<-ranlip.RandomVec( Fn)
print(r)
}
ranlip.FreeMem();
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.