How To Install libranlip-dev on Ubuntu 20.04
Introduction
In this tutorial we learn how to install libranlip-dev
on Ubuntu 20.04.
What is libranlip-dev
libranlip-dev is:
RanLip generates random variates with an arbitrary multivariate Lipschitz density.
While generation of random numbers from a variety of distributions is implemented in many packages (like GSL library http://www.gnu.org/software/gsl/ and UNURAN library http://statistik.wu-wien.ac.at/unuran/), generation of random variate with an arbitrary distribution, especially in the multivariate case, is a very challenging task. RanLip is a method of generation of random variates with arbitrary Lipschitz-continuous densities, which works in the univariate and multivariate cases, if the dimension is not very large (say 3-10 variables).
Lipschitz condition implies that the rate of change of the function (in this case, probability density p(x)) is bounded:
|p(x)-p(y)|<M||x-y||.
From this condition, we can build an overestimate of the density, so called hat function h(x)>=p(x), using a number of values of p(x) at some points. The more values we use, the better is the hat function. The method of acceptance/rejection then works as follows: generatea random variate X with density h(x); generate an independent uniform on (0,1) random number Z; if p(X)<=Z h(X), then return X, otherwise repeat all the above steps.
RanLip constructs a piecewise constant hat function of the required density p(x) by subdividing the domain of p (an n-dimensional rectangle) into many smaller rectangles, and computes the upper bound on p(x) within each of these rectangles, and uses this upper bound as the value of the hat function.
There are three methods to install libranlip-dev
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libranlip-dev Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libranlip-dev
using apt-get
by running the following command:
sudo apt-get -y install libranlip-dev
Install libranlip-dev Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libranlip-dev
using apt
by running the following command:
sudo apt -y install libranlip-dev
Install libranlip-dev Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libranlip-dev
using aptitude
by running the following command:
sudo aptitude -y install libranlip-dev
How To Uninstall libranlip-dev on Ubuntu 20.04
To uninstall only the libranlip-dev
package we can use the following command:
sudo apt-get remove libranlip-dev
Uninstall libranlip-dev And Its Dependencies
To uninstall libranlip-dev
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libranlip-dev
Remove libranlip-dev Configurations and Data
To remove libranlip-dev
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libranlip-dev
Remove libranlip-dev configuration, data, and all of its dependencies
We can use the following command to remove libranlip-dev
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libranlip-dev
References
Summary
In this tutorial we learn how to install libranlip-dev
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.