if "pgaussian", use the p-gaussian kernel function (see Francois et al. 2005). If "gaussian", use the classic gaussian kernel, ie p-gaussian function with p=2 and sigma set to the maximal pairwise distance between elements of the data set.
Value
n x n kernel matrix.
References
Andrew Y. Ng, Michael I. Jordan, Yair Weiss
On Spectral Clustering: Analysis and an Algorithm
Neural Information Processing Symposium 2001
http://www.nips.cc/NIPS2001/papers/psgz/AA35.ps.gz
Francois, D., Wertz, V. and Verleysen, M.
About the locality of kernels in high-dimensional spacesInternational Symposium on Applied Stochastic Models and Data Analysis 2005, pp 238-245.