LoadPartition: Load the computed hat function

Description Usage Arguments Value Author(s) Examples

Description

Loads previously computed hat function from file name(string)

Usage

1

Arguments

string

The file name to read saved partition from

Value

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

Author(s)

Gleb Beliakov, Daniela L. Calderon, Deakin University

Examples

 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();

ranlip documentation built on June 24, 2021, 9:08 a.m.

Related to LoadPartition in ranlip...