close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Changes between Initial Version and Version 1 of TolGuiaDelUsuarioMatrix


Ignore:
Timestamp:
Feb 27, 2009, 5:26:46 PM (16 years ago)
Author:
Víctor de Buen Remiro
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TolGuiaDelUsuarioMatrix

    v1 v1  
     1[[PageOutline]]
     2= Matrix =
     3Funciones que devuelven Matrix[[BR]]
     4 == Función ''' + ''' ==
     5  * Declaración:
     6{{{
     7Matrix (Matrix mat)
     8}}}
     9  * Descripción:
     10{{{
     11Devuelve la misma matriz.
     12}}}
     13  * Lenguaje:C++
     14  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     15
     16 == Función ''' - ''' ==
     17  * Declaración:
     18{{{
     19Matrix (Matrix mat)
     20}}}
     21  * Descripción:
     22{{{
     23Devuelve la matriz con el signo contrario.
     24}}}
     25  * Lenguaje:C++
     26  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     27
     28 == Función '''$*''' ==
     29  * Declaración:
     30{{{
     31Matrix mat1 $* mat2 {Matrix mat1, Matrix mat2}
     32}}}
     33  * Descripción:
     34{{{
     35Devuelve la matriz de productos celda a celda mat1[i,j]*mat2[i,j].Ambas matrices deben tener las mismas dimensiones.Las siguientes dos expresiones son identicas y validas en TOL mat1$*at2==WeightProd(mat1,mat2)
     36}}}
     37  * Lenguaje:C++
     38  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     39
     40 == Función '''$/''' ==
     41  * Declaración:
     42{{{
     43Matrix mat1 $/ mat2 {Matrix mat1, Matrix mat2}
     44}}}
     45  * Descripción:
     46{{{
     47Devuelve la matriz de cocientes celda a celda mat1[i,j]/mat2[i,j].Ambas matrices deben tener las mismas dimensiones.Las siguientes dos expresiones son identicas y validas en TOL mat1$/at2==WeightQuotient(mat1,mat2)
     48}}}
     49  * Lenguaje:C++
     50  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     51
     52 == Función '''*''' ==
     53  * Declaración:
     54{{{
     55Matrix mat1 * mat2 {Matrix mat1, {Matrix|Real} mat2}
     56}}}
     57  * Descripción:
     58{{{
     59Devuelve el producto de dos matrices tales que el numero de columnas de la primera matriz sea igual al numero de filas de la segunda. El segundo argumento puede ser tambien un numero Real
     60}}}
     61  * Lenguaje:C++
     62  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     63
     64 == Función '''+''' ==
     65  * Declaración:
     66{{{
     67Matrix mat1 + mat2 {Matrix mat1, {Matrix|Real} mat2}
     68}}}
     69  * Descripción:
     70{{{
     71Devuelve la suma de dos matrices con las mismas dimensiones.El segundo argumento puede ser tambien un numero Real
     72}}}
     73  * Lenguaje:C++
     74  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     75
     76 == Función '''-''' ==
     77  * Declaración:
     78{{{
     79Matrix mat1 - mat2 {Matrix mat1, {Matrix|Real} mat2}
     80}}}
     81  * Descripción:
     82{{{
     83Devuelve la resta de dos matrices con las mismas dimensiones.El segundo argumento puede ser tambien un numero Real
     84}}}
     85  * Lenguaje:C++
     86  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     87
     88 == Función '''<<''' ==
     89  * Declaración:
     90{{{
     91Matrix mat1 << mat2 {Matrix mat1, Matrix mat2}
     92}}}
     93  * Descripción:
     94{{{
     95Concatena todas las filas de de dos matrices con el mismo numero de columnas.
     96}}}
     97  * Lenguaje:C++
     98  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     99
     100 == Función '''ACos''' ==
     101  * Declaración:
     102{{{
     103Matrix ACos(Matrix mat)
     104}}}
     105  * Descripción:
     106{{{
     107Devuelve el arcocoseno trigonometrico de cada elemento de una matriz.
     108}}}
     109  * Lenguaje:C++
     110  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     111
     112 == Función '''ACosH''' ==
     113  * Declaración:
     114{{{
     115Matrix ACosH(Matrix mat)
     116}}}
     117  * Descripción:
     118{{{
     119Devuelve el arcocoseno hipergeometrico de cada elemento de una matriz.
     120}}}
     121  * Lenguaje:C++
     122  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     123
     124 == Función '''ARMAACov''' ==
     125  * Declaración:
     126{{{
     127Matrix ARMAACov(Polyn ar, Polyn ma, Real n [, Real sigma=1])
     128}}}
     129  * Descripción:
     130{{{
     131Devuelve la matriz de autovarianzas de orden n del proceso ARMA
     132}}}
     133  * Lenguaje:C++
     134  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     135
     136 == Función '''ARMATACov''' ==
     137  * Declaración:
     138{{{
     139Matrix ARMATACov(Polyn ar, Polyn ma, Real n)
     140}}}
     141  * Descripción:
     142{{{
     143Calcula la función de autocovarianzas teórica de un modelo ARMA hasta el orden n.
     144}}}
     145  * Lenguaje:C++
     146  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/bmodel/estim.cpp tol/btol/bmodel/estim.cpp]
     147
     148 == Función '''ASin''' ==
     149  * Declaración:
     150{{{
     151Matrix ASin(Matrix mat)
     152}}}
     153  * Descripción:
     154{{{
     155Devuelve el arcoseno trigonometrico de cada elemento de una matriz.
     156}}}
     157  * Lenguaje:C++
     158  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     159
     160 == Función '''ASinH''' ==
     161  * Declaración:
     162{{{
     163Matrix ASinH(Matrix mat)
     164}}}
     165  * Descripción:
     166{{{
     167Devuelve el arcoseno hipergeometrico de cada elemento de una matriz.
     168}}}
     169  * Lenguaje:C++
     170  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     171
     172 == Función '''ATan''' ==
     173  * Declaración:
     174{{{
     175Matrix ATan(Matrix mat)
     176}}}
     177  * Descripción:
     178{{{
     179Devuelve la arcotangente trigonometrica de cada elemento de una matriz.
     180}}}
     181  * Lenguaje:C++
     182  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     183
     184 == Función '''ATanH''' ==
     185  * Declaración:
     186{{{
     187Matrix ATanH(Matrix mat)
     188}}}
     189  * Descripción:
     190{{{
     191Devuelve la arcotangente hipergeometrica de cada elemento de una matriz.
     192}}}
     193  * Lenguaje:C++
     194  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     195
     196 == Función '''Abs''' ==
     197  * Declaración:
     198{{{
     199Matrix Abs(Matrix mat)
     200}}}
     201  * Descripción:
     202{{{
     203Devuelve el valor absoluto de cada elemento de una matriz.
     204}}}
     205  * Lenguaje:C++
     206  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     207
     208 == Función '''And''' ==
     209  * Declaración:
     210{{{
     211Matrix And(Matrix M1, Matrix M2 [, Matrix M3, ...])
     212}}}
     213  * Descripción:
     214{{{
     215Devuelve el AND logico de todos los argumentos.
     216}}}
     217  * Lenguaje:C++
     218  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     219
     220 == Función '''AutoCor''' ==
     221  * Declaración:
     222{{{
     223Matrix AutoCor(Serie ser, Real n)
     224}}}
     225  * Descripción:
     226{{{
     227Devuelve el vector de autocorrelaciones muestrales de dimension n de una serie entre dos fechas.
     228}}}
     229  * Lenguaje:C++
     230  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     231
     232 == Función '''AutoCov''' ==
     233  * Declaración:
     234{{{
     235Matrix AutoCov(Serie ser, Real n)
     236}}}
     237  * Descripción:
     238{{{
     239Devuelve el vector de autocovarianzas muestrales de dimension n de una serie entre dos fechas.
     240}}}
     241  * Lenguaje:C++
     242  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     243
     244 == Función '''BackDifEq''' ==
     245  * Declaración:
     246{{{
     247Matrix BackDifEq(Ratio R, Matrix X, Matrix X0=0, Matrix Y0=0)
     248}}}
     249  * Descripción:
     250{{{
     251.Resuelve la ecuacion en diferencias Y = R(F)*X con los valores iniciales X0, Y0.
     252}}}
     253  * Lenguaje:C++
     254  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     255
     256 == Función '''BootsSample''' ==
     257  * Declaración:
     258{{{
     259Matrix BootsSample(Set model, Code Estim, Code GetEffect, Code GetNoiseStruct, Code GetParam, Code GetResiduals, Code NewModel, Real B)
     260}}}
     261  * Descripción:
     262{{{
     263Ejecuta un bootstrap
     264}}}
     265  * Lenguaje:C++
     266  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     267
     268 == Función '''BrockwellCov''' ==
     269  * Declaración:
     270{{{
     271Matrix BrockwellCov(Matrix ACOR, Real n)
     272}}}
     273  * Descripción:
     274{{{
     275Devuelve la matriz de covarianzas del vector de autocorrelaciones.
     276}}}
     277  * Lenguaje:C++
     278  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     279
     280 == Función '''BrockwellInvDiag''' ==
     281  * Declaración:
     282{{{
     283Matrix BrockwellInvDiag(Matrix ACOR, Real n)
     284}}}
     285  * Descripción:
     286{{{
     287Devuelve el vector de inversos de desviaciones estandar del vector de autocorrelaciones.
     288}}}
     289  * Lenguaje:C++
     290  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     291
     292 == Función '''Choleski''' ==
     293  * Declaración:
     294{{{
     295Matrix Choleski(Matrix M)
     296}}}
     297  * Descripción:
     298{{{
     299Devuelve la matriz triangular inferior de Choleski de una matriz simetrica y definida positiva.
     300}}}
     301  * Lenguaje:C++
     302  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     303
     304 == Función '''CholeskiInverse''' ==
     305  * Declaración:
     306{{{
     307Matrix CholeskiInverse(Matrix M)
     308}}}
     309  * Descripción:
     310{{{
     311Aplica el metodo de factorizacion de Choleski para invertir una matriz simetrica y definida positiva.
     312}}}
     313  * Lenguaje:C++
     314  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     315
     316 == Función '''CokeBoots''' ==
     317  * Declaración:
     318{{{
     319Matrix CokeBoots(Set model, Code Estim, Code GetEffect, Code GetNoiseStruct, Code GetParam, Code GetResiduals, Code NewModel, Real B)
     320}}}
     321  * Descripción:
     322{{{
     323Ejecuta un bootstrap
     324}}}
     325  * Lenguaje:C++
     326  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     327
     328 == Función '''Col''' ==
     329  * Declaración:
     330{{{
     331Matrix Col(Real x1 [, Real x2, ...])
     332}}}
     333  * Descripción:
     334{{{
     335Devuelve una matriz columna [[x1],[x2],...,[xn]].
     336}}}
     337  * Lenguaje:C++
     338  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     339
     340 == Función '''ColumnPivots''' ==
     341  * Declaración:
     342{{{
     343Matrix ColumnPivots(Matrix x)
     344}}}
     345  * Descripción:
     346{{{
     347Devuelve una matriz con el indice del elemento de maximo valor absoluto para cada columna.
     348}}}
     349  * Lenguaje:C++
     350  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     351
     352 == Función '''ConcatColumns''' ==
     353  * Declaración:
     354{{{
     355Matrix ConcatColumns(Matrix mat1 [, Matrix mat2, ...])
     356}}}
     357  * Descripción:
     358{{{
     359Concatena todas las columnas de una lista de matrices con el mismo numero de filas.
     360}}}
     361  * Lenguaje:C++
     362  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     363
     364 == Función '''ConcatRows''' ==
     365  * Declaración:
     366{{{
     367Matrix ConcatRows(Matrix mat1 [, Matrix mat2, ...])
     368}}}
     369  * Descripción:
     370{{{
     371Concatena todas las filas de una lista de matrices con el mismo numero de columnas.
     372}}}
     373  * Lenguaje:C++
     374  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     375
     376 == Función '''Cor''' ==
     377  * Declaración:
     378{{{
     379Matrix Cor(Matrix s)
     380}}}
     381  * Descripción:
     382{{{
     383Devuelve la matriz de correlacion entre las filas de una matriz.
     384}}}
     385  * Lenguaje:C++
     386  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     387
     388 == Función '''Cos''' ==
     389  * Declaración:
     390{{{
     391Matrix Cos(Matrix mat)
     392}}}
     393  * Descripción:
     394{{{
     395Devuelve el coseno trigonometrico de cada elemento de una matriz.
     396}}}
     397  * Lenguaje:C++
     398  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     399
     400 == Función '''CosH''' ==
     401  * Declaración:
     402{{{
     403Matrix CosH(Matrix mat)
     404}}}
     405  * Descripción:
     406{{{
     407Devuelve el coseno hipergeometrico de cada elemento de una matriz.
     408}}}
     409  * Lenguaje:C++
     410  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     411
     412 == Función '''Cov''' ==
     413  * Declaración:
     414{{{
     415Matrix Cov(Matrix s)
     416}}}
     417  * Descripción:
     418{{{
     419Devuelve la matriz de covarianzas entre las filas de una matriz.
     420}}}
     421  * Lenguaje:C++
     422  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     423
     424 == Función '''DBMatrix''' ==
     425  * Declaración:
     426{{{
     427Matrix DBMatrix(Text consulta [, Real valorDefecto=0])
     428}}}
     429  * Descripción:
     430{{{
     431Devuelve una matriz cuyos datos vienen dados por una consulta a la base de datos abierta. Dicha consulta debe devolver sólo campos numéricos.
     432}}}
     433  * Lenguaje:C++
     434  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/bdb/bdspool.cpp tol/btol/bdb/bdspool.cpp]
     435
     436 == Función '''Diag''' ==
     437  * Declaración:
     438{{{
     439Matrix Diag(Real n, Real x, [Real direccion=1])
     440}}}
     441  * Descripción:
     442{{{
     443Devuelve una matriz diagonal de dimension n y valores diagonales todos iguales a x.
     444}}}
     445  * Lenguaje:C++
     446  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     447
     448 == Función '''DifEq''' ==
     449  * Declaración:
     450{{{
     451Matrix DifEq(Ratio R, Matrix X, Matrix X0=0, Matrix Y0=0)
     452}}}
     453  * Descripción:
     454{{{
     455.Resuelve la ecuacion en diferencias Y = R(B)*X con los valores iniciales X0, Y0.
     456}}}
     457  * Lenguaje:C++
     458  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     459
     460 == Función '''DurbinAutoReg''' ==
     461  * Declaración:
     462{{{
     463Matrix DurbinAutoReg(Matrix acor, Real n)
     464}}}
     465  * Descripción:
     466{{{
     467Devuelve la matriz de polinomios autoregresivos de Durbin-Levinson de una matriz de autocorrelaciones dada hasta el grado n.En la fila k-esima aparecen los opuestos de los k coeficientes de grado no nulo pues el de grado 0 siempre es 1.
     468}}}
     469  * Lenguaje:C++
     470  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     471
     472 == Función '''Eq''' ==
     473  * Declaración:
     474{{{
     475Matrix Eq(Matrix M1, Matrix M2 [, Matrix M3, ...])
     476}}}
     477  * Descripción:
     478{{{
     479Devuelve cierto si cada argumento es igual que el siguiente.
     480Tambien puede invocarse como EQ
     481}}}
     482  * Lenguaje:C++
     483  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     484
     485 == Función '''EvalPol''' ==
     486  * Declaración:
     487{{{
     488Matrix EvalPol(Polyn p, Matrix x)
     489}}}
     490  * Descripción:
     491{{{
     492Evalua la funcion polinomial correspondiente en cada celda de la matriz dada.
     493}}}
     494  * Lenguaje:C++
     495  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     496
     497 == Función '''Exp''' ==
     498  * Declaración:
     499{{{
     500Matrix Exp(Matrix mat)
     501}}}
     502  * Descripción:
     503{{{
     504Devuelve la exponencial de cada elemento de una matriz.
     505}}}
     506  * Lenguaje:C++
     507  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     508
     509 == Función '''F01''' ==
     510  * Declaración:
     511{{{
     512Matrix F01(Matrix mat)
     513}}}
     514  * Descripción:
     515{{{
     516Devuelve la funcion de distribucion normal estandar de cada celda de una matriz.
     517}}}
     518  * Lenguaje:C++
     519  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     520
     521 == Función '''Floor''' ==
     522  * Declaración:
     523{{{
     524Matrix Floor(Matrix mat)
     525}}}
     526  * Descripción:
     527{{{
     528Devuelve el valor truncado de cada elemento de una matriz.
     529}}}
     530  * Lenguaje:C++
     531  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     532
     533 == Función '''Frequency''' ==
     534  * Declaración:
     535{{{
     536Matrix Frequency(Matrix M, Real n [, Real min, Real max])
     537}}}
     538  * Descripción:
     539{{{
     540Hace un analisis de frecuencia de n intervalos para la primera columna de una matriz M. Devuelve una matriz con dos columnas. En la primera columna contiene el limite superior de cada intervalo. En la segunda columna contiene el numero de valores de M que pertenecen a cada intervalo.
     541}}}
     542  * Lenguaje:C++
     543  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     544
     545 == Función '''GE''' ==
     546  * Declaración:
     547{{{
     548Matrix GE(Matrix M1, Matrix M2 [, Matrix M3, ...])
     549}}}
     550  * Descripción:
     551{{{
     552Devuelve cierto si cada argumento es mayor o igual que el siguiente.
     553}}}
     554  * Lenguaje:C++
     555  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     556
     557 == Función '''GT''' ==
     558  * Declaración:
     559{{{
     560Matrix GT(Matrix M1, Matrix M2 [, Matrix M3, ...])
     561}}}
     562  * Descripción:
     563{{{
     564Devuelve cierto si cada argumento es mayor que el siguiente.
     565}}}
     566  * Lenguaje:C++
     567  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     568
     569 == Función '''GaussInverse''' ==
     570  * Declaración:
     571{{{
     572Matrix GaussInverse(Matrix M)
     573}}}
     574  * Descripción:
     575{{{
     576Aplica el metodo de reduccion de Gauss para invertir una matriz cuadrada.
     577}}}
     578  * Lenguaje:C++
     579  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     580
     581 == Función '''GaussReduction''' ==
     582  * Declaración:
     583{{{
     584Matrix GaussReduction(Matrix mat, Real n)
     585}}}
     586  * Descripción:
     587{{{
     588Aplica el metodo de reduccion de Gauss a las n primeras columnas de una matriz.
     589}}}
     590  * Lenguaje:C++
     591  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     592
     593 == Función '''Gaussian''' ==
     594  * Declaración:
     595{{{
     596Matrix Gaussian(Real filas, Real columnas, Real nu, Real sigma)
     597}}}
     598  * Descripción:
     599{{{
     600Devuelve una matriz de numeros con distribucion normal(mu,sigma^2) independientes.
     601}}}
     602  * Lenguaje:C++
     603  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     604
     605 == Función '''GetNumeric''' ==
     606  * Declaración:
     607{{{
     608Matrix GetNumeric(Set ejemplo)
     609}}}
     610  * Descripción:
     611{{{
     612Construye un conjunto semejante al ejemplo dado en el que , opcionalmente, se sustituyen los datos numericos por los datos de la matriz dada.
     613}}}
     614  * Lenguaje:C++
     615  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     616
     617 == Función '''GibbsConstrainedMNormal''' ==
     618  * Declaración:
     619{{{
     620Matrix GibbsConstrainedMNormal(Matrix mu, Anything A, Matrix B, Matrix b [, Real s2=1.0, Real size=100, Real burning=3, Matrix X0=0])
     621}}}
     622  * Descripción:
     623{{{
     624Genera una cadena de markov a partir de una multinormal X ~ N_R[mu, s2*A] restringida a la region R, donde R viene dada por un sistema de desigualdades lineales Bx <= b.
     625
     626Parametros:
     627
     628     mu: parametro media de la distribucion N_R.
     629   s2,A: s2*A es parametro covarianza de la distribucion N_R. Ver debajo la descripcion del parametro A.
     630    B,b: B*X<=b define la region R asociada a las restricciones lineales.
     631   size: tamaño de la cadena de markov solicitado.
     632burning: numero de muestras descartadas.
     633     X0: punto inicial de la cadena. Debe pertencer a R, es decir B*X0<=b.
     634
     635Descripcion de la matriz de covarianza:
     636
     637La matriz de covarianza SIGMA=s2*A puede darse en forma de Matriz (Matrix) o conjunto (Set)
     638
     639            Matrix A: se utiliza cholesky como metodo de factorizacion de A
     640  [["FULL_CHOL", A]]: se utiliza cholesky como metodo de factorizacion de A, es equivalente a pasar la matriz A como argumento.
     641  [["FACT_CHOL", L]]: L es el factor cholesky de A, se asume que A = L*L'
     642 [["FACT_ICHOL", L]]: L es el factor cholesky de A^-1, se asume que  A^-1 = L*L'
     643   [["FULL_SVD", A]]: se utiliza SVD como metodo de factorizacion de A A
     644[["FACT_SVD", V, W]]: factorizacion SVD de A, se asume que A = V*W^2*V'
     645[["FACT_ISVD", V W]]: factorizacion SVD de A^-1, se asume que A^-1 = V*W^2*V
     646  [[Text "DIAG", D]]: A=D es una matriz diagonal.
     647
     648Las matrices diagonales D o W se pueden especificar como vectores filas o columnas o como matriz cuadrada de la cual solo la diagonal es considerada.
     649
     650Si la dimension del vector mu es 1, entonces el argumento A no tiene significado y se simula una normal unvariante truncada con parametro media mu(1,1) y varianza s2.
     651
     652Ejemplo:
     653
     654    Matrix mu = Col(2.0, 2.0);
     655    Matrix COV = ((1.0, 4/5.0),(4/5.0, 1.0));
     656    Matrix B = ((-1.0, 1.0), (0.0, -1.0));
     657    Matrix b = Col(0.0, 0.0);
     658    Matrix MCsample = GibbsConstrainedMNormal(mu, COV, B, b, 1, 100);
     659
     660Referencias:
     661
     662La implementacion esta basada en "Eficient Gibbs Sampling of Truncated Multivariate Normal with Application to Constrained Linear Regression" : http://www.stat.colostate.edu/~rdavis/papers/CLR.pdf
     663}}}
     664  * Lenguaje:C++
     665  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     666
     667 == Función '''GibbsRectangleMNormal''' ==
     668  * Declaración:
     669{{{
     670Matrix GibbsRectangleMNormal(Matrix mu, Anything COV, Matrix corner1, Matrix corner2 [, Real s2=1, Real size=1])
     671}}}
     672  * Descripción:
     673{{{
     674Genera una cadena de markov para una multinormal truncada donde la zona de muestreo es el rectangulo multidimensional definido por las esquinas c1,c2. El parametro 'size' indica el tamaño de la cadena.
     675La matriz de covarianza COV puede especificarse en diversas formas:
     676  Matrix COV : iternamente se usa cholesky para descomponer la matrix
     677  [[Text "FULL_CHOL" Matrix COV]] : iternamente se usa cholesky para descomponer la matrix, es similar a dar solo Matrix COV
     678  [[Text "FACT_CHOL" Matrix L]] : se asume que COV = L*L'  [[Text "FACT_ICHOL" Matrix L]] :  se asume que COV^-1 = L*L'  [[Text "FULL_SVD" Matrix COV]] : se usa SVD internamente para descomponer COV  [[Text "FACT_SVD" Matrix L]] :  se asume que COV = V*W^2*V'  [[Text "FACT_ISVD" Matrix L]] :  se asume que COV^-1 = V*W^2*V  [[Text "DIAG", D]] : se asume que COV es una matriz diagonal siendo D un vector columna con los elementos de la diagonal de COV.
     679
     680Las matrices diagonales D o W se pueden especificar como vectores filas o columnas o como matriz cuadrada de la cual solo la diagonal es considerada.
     681
     682Ejemplo:
     683
     684    Matrix mu = Col(0.0, 2.0);
     685    Matrix COV = ((1.0, 4/5.0),(4/5.0, 1.0));
     686    Matrix c1 = Col(-1.0, 0.5);
     687    Matrix c2 = Col(1.0, 1.5);
     688    Matrix MCsample = GibbsRectangleMNormal(mu, COV, c1, c2, 1, 100);
     689}}}
     690  * Lenguaje:C++
     691  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     692
     693 == Función '''GibbsSampler''' ==
     694  * Declaración:
     695{{{
     696Matrix GibbsSampler(Set Conditionals, Real BurningPeriod, Real SampleSize)
     697}}}
     698  * Descripción:
     699{{{
     700Muestreo multidimensional mediante Gibbs sampler
     701
     702Argumentos:
     703
     704   Conditionals --> especificación de las densidades de cada uno de los parámetros
     705                    condicionados al resto de los parámetros. Una densidad condicional
     706                    la podemos definir de dos formas:
     707                    1- Sabemos generar las muestras del parámetro condicionado. La densidad
     708                       se define como un conjunto formado por el generador de muetras de la
     709                       densidad y un conjunto de datos externos. Ejemplo: [[RNormalX, Mydata]]
     710                       El prototipo del generador debe ser:
     711                           Real (Matrix CondParameters, Real Previous, Set data)
     712
     713                           CondParameters -> valor de los parámetros condicionantes.
     714                           Previous       -> valor previo del parámetro condicionado.
     715                           data           -> datos globales, necesarios para la evaluación
     716                                             del generador.
     717
     718                    2- Solo sabemos evaluar la densidad (hasta un factor constante) o el
     719                       logaritmo de la densidad (menos un término constante). La densidad se
     720                       define por un evaluador de la misma, un intervalo de evaluación y un flag
     721                       indicando si se evalua la densidad o el logaritmo de la densidad,
     722                       Ejemplo: [[LogNormalX,MyData,-100,100,1]]. El prototipo del generador debe ser:
     723                           Real (Real X, Matrix CondParameters, Real Previous, Set data)
     724
     725                           X -> valor del dominio donde evaluar la densidad.
     726                           Resto de parametros descritos en 1-
     727  BuringPeriod --> Número de muestra a descartar inicialmente.
     728  SampleSize   --> Tamaño de muestras a generar. El valor de retorno de la función es una matriz donde
     729                   las filas son la muetras de la variable y las columnas los valores de los parámetros.
     730
     731Ejemplo:
     732
     733
     734}}}
     735  * Lenguaje:C++
     736  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/gibbssampler.cpp tol/btol/matrix_type/gibbssampler.cpp]
     737
     738 == Función '''Gradient''' ==
     739  * Declaración:
     740{{{
     741Matrix Gradient(Code function, Matrix point)
     742}}}
     743  * Descripción:
     744{{{
     745Determina el gradiente de una funcion evaluada en un punto dado.         
     746Argumentos:                                                               
     747function ---> funcion a analizar,                                         
     748point    ---> punto de calculo del gradiente                             
     749
     750}}}
     751  * Lenguaje:C++
     752  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     753
     754 == Función '''IfMat''' ==
     755  * Declaración:
     756{{{
     757Matrix IfMat(Matrix condition, Matrix A, Matrix B)
     758}}}
     759  * Descripción:
     760{{{
     761Para cada celda (i,j) si condition(i,j) es cierto devuelve A(i,j) y si no B(i,j).
     762}}}
     763  * Lenguaje:C++
     764  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     765
     766 == Función '''InvF01''' ==
     767  * Declaración:
     768{{{
     769Matrix InvF01(Matrix mat)
     770}}}
     771  * Descripción:
     772{{{
     773Devuelve la funcion inversa de la distribucion normal estandar de cada celda de una matriz.
     774}}}
     775  * Lenguaje:C++
     776  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     777
     778 == Función '''InvPartAutoCor''' ==
     779  * Declaración:
     780{{{
     781Matrix InvPartAutoCor(Serie ser, Real n)
     782}}}
     783  * Descripción:
     784{{{
     785Devuelve el vector de autocorrelaciones parciales inversas muestrales de dimension n de una serie entre dos fechas.
     786}}}
     787  * Lenguaje:C++
     788  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     789
     790 == Función '''InverseAutoCor''' ==
     791  * Declaración:
     792{{{
     793Matrix InverseAutoCor(Serie ser, Real n)
     794}}}
     795  * Descripción:
     796{{{
     797Devuelve el vector de autocorrelaciones inversas muestrales de dimension n de una serie entre dos fechas.
     798}}}
     799  * Lenguaje:C++
     800  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     801
     802 == Función '''InverseDiag''' ==
     803  * Declaración:
     804{{{
     805Matrix InverseDiag(Matrix M)
     806}}}
     807  * Descripción:
     808{{{
     809Devuelve la inversa de una matriz diagonal
     810}}}
     811  * Lenguaje:C++
     812  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     813
     814 == Función '''IsFinite''' ==
     815  * Declaración:
     816{{{
     817Matrix IsFinite(Matrix mat)
     818}}}
     819  * Descripción:
     820{{{
     821Devuelve cierto en cada celda que contenga un numero finito conocido.
     822}}}
     823  * Lenguaje:C++
     824  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     825
     826 == Función '''IsNegInf''' ==
     827  * Declaración:
     828{{{
     829Matrix IsNegInf(Matrix mat)
     830}}}
     831  * Descripción:
     832{{{
     833Devuelve cierto en cada celda que contenga el infinito negativo.
     834}}}
     835  * Lenguaje:C++
     836  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     837
     838 == Función '''IsPosInf''' ==
     839  * Declaración:
     840{{{
     841Matrix IsPosInf(Matrix mat)
     842}}}
     843  * Descripción:
     844{{{
     845Devuelve cierto en cada celda que contenga el infinito positivo.
     846}}}
     847  * Lenguaje:C++
     848  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     849
     850 == Función '''IsUnknown''' ==
     851  * Declaración:
     852{{{
     853Matrix IsUnknown(Matrix mat)
     854}}}
     855  * Descripción:
     856{{{
     857Devuelve cierto en cada celda que contenga un numero desconocido.
     858}}}
     859  * Lenguaje:C++
     860  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     861
     862 == Función '''Kernel''' ==
     863  * Declaración:
     864{{{
     865Matrix Kernel(Matrix A)
     866}}}
     867  * Descripción:
     868{{{
     869Devuelve una base ortonormal del nucleo de una matriz A, es decir, la matriz K mas grande para la que se cumple que
     870        A*K   = 0
     871        K'*K = I
     872
     873
     874}}}
     875  * Lenguaje:C++
     876  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     877
     878 == Función '''KroneckerProduct''' ==
     879  * Declaración:
     880{{{
     881Matrix KroneckerProduct(Matrix A, Matrix B)
     882}}}
     883  * Descripción:
     884{{{
     885En matematicas, el producto de Kronecker, denotado por una x dentro de un circulo, es una operacion de dos matrices de tamaño arbitrario dando por resultado la matriz del bloque (aij*B).  Es un caso especial de un producto del tensor. El producto de Kronecker no se debe confundir con la multiplicacion usual de matrices, que es una operacion enteramente distinta.
     886}}}
     887  * Lenguaje:C++
     888  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     889
     890 == Función '''LE''' ==
     891  * Declaración:
     892{{{
     893Matrix LE(Matrix M1, Matrix M2 [, Matrix M3, ...])
     894}}}
     895  * Descripción:
     896{{{
     897Devuelve cierto si cada argumento es menor o igual que el siguiente.
     898}}}
     899  * Lenguaje:C++
     900  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     901
     902 == Función '''LT''' ==
     903  * Declaración:
     904{{{
     905Matrix LT(Matrix M1, Matrix M2 [, Matrix M3, ...])
     906}}}
     907  * Descripción:
     908{{{
     909Devuelve cierto si cada argumento es menor que el siguiente.
     910}}}
     911  * Lenguaje:C++
     912  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     913
     914 == Función '''LTInverse''' ==
     915  * Declaración:
     916{{{
     917Matrix LTInverse(Matrix L)
     918}}}
     919  * Descripción:
     920{{{
     921Aplica el metodo de reduccion de Gauss para invertir una matriz cuadrada triangular inferior. Para sistemas triangulares más generales use TrSolve pasando Diag(n,1) como argumento B
     922}}}
     923  * Lenguaje:C++
     924  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     925
     926 == Función '''LTSolve''' ==
     927  * Declaración:
     928{{{
     929Matrix LTSolve(Matrix L, Matrix B)
     930}}}
     931  * Descripción:
     932{{{
     933Aplica el metodo de reduccion de Gauss para resolver el sistema lineal L*X=B donde L es triangular inferior. Para sistemas triangulares más generales use TrSolve
     934}}}
     935  * Lenguaje:C++
     936  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     937
     938 == Función '''LinComb''' ==
     939  * Declaración:
     940{{{
     941Matrix LinComb(Matrix mat)
     942}}}
     943  * Descripción:
     944{{{
     945Devuelve las ecuaciones de las combinaciones lineales de las filas de una matriz que se anulan, si se trata una matriz regular, o la matriz vacia en otro caso.
     946}}}
     947  * Lenguaje:C++
     948  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     949
     950 == Función '''Log''' ==
     951  * Declaración:
     952{{{
     953Matrix Log(Matrix mat)
     954}}}
     955  * Descripción:
     956{{{
     957Devuelve el logaritmo natural de cada elemento de una matriz.
     958}}}
     959  * Lenguaje:C++
     960  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     961
     962 == Función '''Log10''' ==
     963  * Declaración:
     964{{{
     965Matrix Log10(Matrix mat)
     966}}}
     967  * Descripción:
     968{{{
     969Devuelve el logaritmo decimal de cada elemento de una matriz.
     970}}}
     971  * Lenguaje:C++
     972  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     973
     974 == Función '''MatAppendFile''' ==
     975  * Declaración:
     976{{{
     977Matrix MatAppendFile(Text nombreFichero, Matrix mat)
     978}}}
     979  * Descripción:
     980{{{
     981Añade la matrix 'mat' al fichero 'nombreFichero'.
     982}}}
     983  * Lenguaje:C++
     984  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     985
     986 == Función '''MatReadFile''' ==
     987  * Declaración:
     988{{{
     989Matrix MatReadFile(Text nombreFichero)
     990}}}
     991  * Descripción:
     992{{{
     993Lee una matriz de un fichero en formato binario
     994}}}
     995  * Lenguaje:C++
     996  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     997
     998 == Función '''MatReadRows''' ==
     999  * Declaración:
     1000{{{
     1001Matrix MatReadRows(Text filename, Real firstRow, Real numRows [, Real thinning=1])
     1002}}}
     1003  * Descripción:
     1004{{{
     1005Lee un rango de filas de una matriz de un fichero en formato binario
     1006}}}
     1007  * Lenguaje:C++
     1008  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1009
     1010 == Función '''MatWriteFile''' ==
     1011  * Declaración:
     1012{{{
     1013Matrix MatWriteFile(Text nombreFichero, Matrix mat)
     1014}}}
     1015  * Descripción:
     1016{{{
     1017Escribe una matriz en un fichero en formato binario
     1018}}}
     1019  * Lenguaje:C++
     1020  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1021
     1022 == Función '''Max''' ==
     1023  * Declaración:
     1024{{{
     1025Matrix Max(Matrix M1, Matrix M2 [, Matrix M3, ...])
     1026}}}
     1027  * Descripción:
     1028{{{
     1029Devuelve el maximo de todos los argumentos.
     1030}}}
     1031  * Lenguaje:C++
     1032  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1033
     1034 == Función '''MetropolisHastings''' ==
     1035  * Declaración:
     1036{{{
     1037Matrix MetropolisHastings(Set BlockDef, Real Burning, Real Size [,Set Workspace, Set Monitor])
     1038}}}
     1039  * Descripción:
     1040{{{
     1041Algoritmo Metropolis-Hastings para simular una distribución multivariada. Usa un algoritmo 'block-at-a-time'
     1042
     1043Argumentos:
     1044
     1045   Burning - número de muestras a descartar inicialmente
     1046      Size - número de muestras a generar. El resultado es una matriz con Size columnas y tantas filas como parámetros se simulen.
     1047  BlockDef - Conjunto que define cada uno de los bloques en los que se particiona el vector de parametros conjunto.
     1048
     1049  La definción de un bloque es a su vez un Set con la siguiente structura:
     1050
     1051    [1] - tamaño del bloque, debe ser > 0
     1052    [2] - tipo de muestreo a utilizar en el bloque, debe ser: 0 -> sampler directo, 1 -> 'random walk', 2 -> MH genérico.
     1053    [3] - estado inicial del bloque en forma de vector columna
     1054    [4] - datos específicos del bloque
     1055    [5] - Matrix SamplerCode(Matrix X, Matrix CX, Matrix join, Set blk_data [, Real ID_workspace])
     1056          Generador para este bloque. Si [2] es 0 entonces este código es el generador para la densidad condicional completa del bloque.
     1057          En cualquier otro caso es el código que genera candidatos a ser considerados en el test MH de este bloque.
     1058          Tiene los siguientes argumentos:
     1059                 X - es el valor actual de los paramétros para este bloque
     1060                CX - es el vector conjunto excepto este bloque
     1061
     1062              join - es el vector conjunto de parámetros
     1063          blk_data - son datos espcíficos del bloque
     1064
     1065          ID_workspace - identificador a ser usado en MHSetWorkspace o MHGetWorkspace según se necesite
     1066
     1067    Si [2] no es 0 entonces necesitamos 2 argumentas extras:
     1068
     1069      [6] - Matrix TargetDenCode(Matrix X, Matrix CX, Matrix join, Set blk_data [, Real ID_workspace])
     1070            Evalúa log pi(x) -- el log de la densidad objetivo
     1071      [7] - valor Real que indica si el kernel q(x,y) is simétrico,
     1072            puede ser 0 -> no simétrico or 1 -> simétrico
     1073
     1074    Si [7] es 0 entonces necesitamos un argumento más:
     1075
     1076      [8] - Real KernelDenCode(Matrix Y, Matrix X, Matrix CX, Matrix join, Set blk_data [, Real ID_workspace])
     1077            Evalúa log q(x,y) -- el log de la densidad generadora de candidatos
     1078
     1079  Workspace - Es un Set que sera manipulado por el Code  de usuario en cada bloque.
     1080              Cada Code de usuario invocado por el MH recibirá un identificador de workspace
     1081              que puede utilizarse para modificar este Set. El identificador de workspace es
     1082              el argumento ID_workspace del Code de usuario.
     1083  Monitor - Define a monitor of the MH's chain. It is a set with at least 4 elements:
     1084            [1] - tipo de Monitor, es un texto que puede tomar los valores: "csv".
     1085            [2] - nombre del monitor. Si el tipo es "csv", es el nombre de un archivo donde se escribirá la cadena.
     1086            [3] - frecuencia de actualizació del monitor. Es un valor entero que indica cada cuantas muestras se actualiza el Monitor.
     1087            [4] - discartar bloque de muestras previo. Puede tomar los valores 0 ó 1. 0 indica que la matriz resultante contendrá toda la muestra.
     1088                  1 significa que la matriz resultante contendrá un número de muestras igual al valor de 'frequency' en lugar de 'size'.
     1089
     1090Ejemplo:
     1091
     1092
     1093}}}
     1094  * Lenguaje:C++
     1095  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/gibbssampler.cpp tol/btol/matrix_type/gibbssampler.cpp]
     1096
     1097 == Función '''Min''' ==
     1098  * Declaración:
     1099{{{
     1100Matrix Min(Matrix M1, Matrix M2 [, Matrix M3, ...])
     1101}}}
     1102  * Descripción:
     1103{{{
     1104Devuelve el minimo de todos los argumentos.
     1105}}}
     1106  * Lenguaje:C++
     1107  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1108
     1109 == Función '''MinimumResidualsSolve''' ==
     1110  * Declaración:
     1111{{{
     1112Matrix MinimumResidualsSolve(Matrix M, Matrix B [, Real chop=1.49012e-008, Matrix X0=Tra(M)*B,Real maxIter=20*Columns(M)])
     1113}}}
     1114  * Descripción:
     1115{{{
     1116Aplica el metodo de los Minimos Residuos para resolver el sistema lineal M*X=B comenzando por el valor inicial <X0> y continuando hasta  que el error sea menor que <chop> o se supere el número de iteraciones indicadas.
     1117}}}
     1118  * Lenguaje:C++
     1119  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1120
     1121 == Función '''MtMSqr''' ==
     1122  * Declaración:
     1123{{{
     1124Matrix MtMSqr(Matrix mat)
     1125}}}
     1126  * Descripción:
     1127{{{
     1128Devuelve el producto de una matriz por si misma
     1129}}}
     1130  * Lenguaje:C++
     1131  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1132
     1133 == Función '''MultiFitLinear''' ==
     1134  * Declaración:
     1135{{{
     1136Matrix MultiFitLinear(Matrix A, Matrix b)
     1137}}}
     1138  * Descripción:
     1139{{{
     1140Calcula la solucion de mejor ajuste del sistema b = A x.               
     1141El calculo emplea la descomposicion en valor singular de la matriz A. 
     1142Argumentos:                                                           
     1143A ---> matriz                                                         
     1144b ---> vector de terminos independientes                             
     1145
     1146}}}
     1147  * Lenguaje:C++
     1148  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1149
     1150 == Función '''NE''' ==
     1151  * Declaración:
     1152{{{
     1153Matrix NE(Matrix M1, Matrix M2 [, Matrix M3, ...])
     1154}}}
     1155  * Descripción:
     1156{{{
     1157Devuelve cierto si cada argumento no es igual que el siguiente.
     1158}}}
     1159  * Lenguaje:C++
     1160  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1161
     1162 == Función '''NormDiag''' ==
     1163  * Declaración:
     1164{{{
     1165Matrix NormDiag(Matrix m)
     1166}}}
     1167  * Descripción:
     1168{{{
     1169Devuelve una matriz equivalente a m con diagonal unitaria.Por ejemplo, dada una matriz de covarianzas devuelve la decorrelaciones. Si m no es una matriz cuadrada muestra un error.
     1170}}}
     1171  * Lenguaje:C++
     1172  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1173
     1174 == Función '''Not''' ==
     1175  * Declaración:
     1176{{{
     1177Matrix Not(Matrix mat)
     1178}}}
     1179  * Descripción:
     1180{{{
     1181Devuelve el No logico de una matriz.
     1182}}}
     1183  * Lenguaje:C++
     1184  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1185
     1186 == Función '''Or''' ==
     1187  * Declaración:
     1188{{{
     1189Matrix Or(Matrix M1, Matrix M2 [, Matrix M3, ...])
     1190}}}
     1191  * Descripción:
     1192{{{
     1193Devuelve el OR logico de todos los argumentos.
     1194}}}
     1195  * Lenguaje:C++
     1196  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1197
     1198 == Función '''OrthonormalCompletion''' ==
     1199  * Declaración:
     1200{{{
     1201Matrix OrthonormalCompletion(Matrix mat, Real m)
     1202}}}
     1203  * Descripción:
     1204{{{
     1205Añade columnas a una matriz ortonormal para obtener una matriz ortonormal de m columnas.
     1206}}}
     1207  * Lenguaje:C++
     1208  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1209
     1210 == Función '''PCor''' ==
     1211  * Declaración:
     1212{{{
     1213Matrix PCor(Matrix s)
     1214}}}
     1215  * Descripción:
     1216{{{
     1217Devuelve la matriz de correlacion parciales entre las filas de una matriz.
     1218}}}
     1219  * Lenguaje:C++
     1220  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1221
     1222 == Función '''PartAutoCor''' ==
     1223  * Declaración:
     1224{{{
     1225Matrix PartAutoCor(Serie ser, Real n)
     1226}}}
     1227  * Descripción:
     1228{{{
     1229Devuelve el vector de autocorrelaciones parciales muestrales de dimension n de una serie entre dos fechas.
     1230}}}
     1231  * Lenguaje:C++
     1232  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1233
     1234 == Función '''PivotByColumns''' ==
     1235  * Declaración:
     1236{{{
     1237Matrix PivotByColumns(Matrix x, Matrix p)
     1238}}}
     1239  * Descripción:
     1240{{{
     1241Devuelve la matriz x pivotada por columnas.
     1242}}}
     1243  * Lenguaje:C++
     1244  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1245
     1246 == Función '''PivotByRows''' ==
     1247  * Declaración:
     1248{{{
     1249Matrix PivotByRows(Matrix x, Matrix p)
     1250}}}
     1251  * Descripción:
     1252{{{
     1253Devuelve la matriz x pivotada por filas.
     1254}}}
     1255  * Lenguaje:C++
     1256  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1257
     1258 == Función '''PolMat''' ==
     1259  * Declaración:
     1260{{{
     1261Matrix PolMat(Polyn pol,Real filas, Real columnas)
     1262}}}
     1263  * Descripción:
     1264{{{
     1265Devuelve la representacion matricial de un polinomio de retardos.Si el polinomio no contiene términos en F, entonces se trata de una matriz triangular inferior que tiene todos los valores de la diagonal principal iguales al coeficiente de grado 0 del polinomio, y los de las diagonales inferiores iguales al coeficiente del grado correspondiente. Si tiene térmnos en F, ocurre de forma análoga con las diagonales superiores
     1266}}}
     1267  * Lenguaje:C++
     1268  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1269
     1270 == Función '''PostProdDiag''' ==
     1271  * Declaración:
     1272{{{
     1273Matrix PostProdDiag(Matrix m, Matrix d)
     1274}}}
     1275  * Descripción:
     1276{{{
     1277Multiplica por la derecha una matriz <m> por la matriz diagonal cuyos elementos en la diagonal principal son los de la matriz fila <d>
     1278  PostProdDiag(m,d) == m*SetDiag(MatSet(d)[1])
     1279}}}
     1280  * Lenguaje:C++
     1281  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1282
     1283 == Función '''PreProdDiag''' ==
     1284  * Declaración:
     1285{{{
     1286Matrix PreProdDiag(Matrix d, Matrix m)
     1287}}}
     1288  * Descripción:
     1289{{{
     1290Multiplica por la derecha una matriz <m> por la matriz diagonal cuyos elementos en la diagonal principal son los de la matriz fila <d>
     1291  PreProdDiag(d,m) == SetDiag(MatSet(d)[1])*m
     1292}}}
     1293  * Lenguaje:C++
     1294  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1295
     1296 == Función '''PseudoInverseDiag''' ==
     1297  * Declaración:
     1298{{{
     1299Matrix PseudoInverseDiag(Matrix M , Real corte)
     1300}}}
     1301  * Descripción:
     1302{{{
     1303Devuelve la pseudo-inversa de una matriz diagonal inviertiendo los elementos de la diagonal con valor absoluto mayor o igual que el valor de corte dado.
     1304}}}
     1305  * Lenguaje:C++
     1306  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1307
     1308 == Función '''Quantile''' ==
     1309  * Declaración:
     1310{{{
     1311Matrix Quantile(Matrix mat, Matrix p)
     1312}}}
     1313  * Descripción:
     1314{{{
     1315Devuelve el cuantil de probabilidad p de todos los elementos de una matriz.
     1316}}}
     1317  * Lenguaje:C++
     1318  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1319
     1320 == Función '''RPow''' ==
     1321  * Declaración:
     1322{{{
     1323Matrix RPow(Matrix mat, Real x)
     1324}}}
     1325  * Descripción:
     1326{{{
     1327Devuelve la potencia de cada elemnto de una matriz a un numero real.
     1328}}}
     1329  * Lenguaje:C++
     1330  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1331
     1332 == Función '''RProd''' ==
     1333  * Declaración:
     1334{{{
     1335Matrix RProd(Matrix mat, Real x)
     1336}}}
     1337  * Descripción:
     1338{{{
     1339Devuelve el producto de cada elemento de una matriz por un numero real.
     1340}}}
     1341  * Lenguaje:C++
     1342  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1343
     1344 == Función '''RSum''' ==
     1345  * Declaración:
     1346{{{
     1347Matrix RSum(Matrix mat, Real x)
     1348}}}
     1349  * Descripción:
     1350{{{
     1351Devuelve la suma de cada elemnto de una matriz y un numero real.
     1352}}}
     1353  * Lenguaje:C++
     1354  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1355
     1356 == Función '''Rand''' ==
     1357  * Declaración:
     1358{{{
     1359Matrix Rand(Real filas, Real columnas, Real min, Real max)
     1360}}}
     1361  * Descripción:
     1362{{{
     1363Devuelve una matriz de numeros con distribucion uniforme[min, max] independientes.
     1364}}}
     1365  * Lenguaje:C++
     1366  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1367
     1368 == Función '''RandCombination''' ==
     1369  * Declaración:
     1370{{{
     1371Matrix RandCombination(Real numComb, Real m, Real n)
     1372}}}
     1373  * Descripción:
     1374{{{
     1375Devuelve una matriz con m permutaciones de n numeros tomados de n en n.
     1376}}}
     1377  * Lenguaje:C++
     1378  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1379
     1380 == Función '''RandConstrainedMNormal''' ==
     1381  * Declaración:
     1382{{{
     1383Matrix RandConstrainedMNormal(Matrix mu, Anything COV, Matrix B, Matrix b [, Real s2=1.0, Real burning, Real size=3, Matrix X0=0])
     1384}}}
     1385  * Descripción:
     1386{{{
     1387Realiza una muestra a partir de una multinormal truncada donde la zona de muestreo viene dada por un sistema de desigualdades lineales Bx <= b. El parametro 'size' indica el tamaño de la cadena de markov a generar para obtener la muestra.
     1388La matriz de covarianza COV puede especificarse en diversas formas:
     1389  Matrix COV : iternamente se usa cholesky para descomponer la matrix
     1390  [[Text "FULL_CHOL" Matrix COV]] : iternamente se usa cholesky para descomponer la matrix, es similar a dar solo Matrix COV
     1391  [[Text "FACT_CHOL" Matrix L]] : se asume que COV = L*L'
     1392  [[Text "FACT_ICHOL" Matrix L]] :  se asume que COV^-1 = L*L'
     1393  [[Text "FULL_SVD" Matrix COV]] : se usa SVD internamente para descomponer COV
     1394  [[Text "FACT_SVD" Matrix L]] :  se asume que COV = V*W^2*V'
     1395  [[Text "FACT_ISVD" Matrix L]] :  se asume que COV^-1 = V*W^2*V
     1396  [[Text "DIAG", D]] : se asume que COV es una matriz diagonal siendo D un vector columna con los elementos de la diagonal de COV.
     1397
     1398Las matrices diagonales D o W se pueden especificar como vectores filas o columnas o como matriz cuadrada de la cual solo la diagonal es considerada.
     1399
     1400Ejemplo:
     1401
     1402    Matrix mu = Col(2.0, 2.0);
     1403    Matrix COV = ((1.0, 4/5.0),(4/5.0, 1.0));
     1404    Matrix B = ((-1.0, 1.0), (0.0, -1.0));
     1405    Matrix b = Col(0.0, 0.0);
     1406    Matrix sample = RandConstrainedMNormal(mu, COV, B, b, 1, 100);
     1407}}}
     1408  * Lenguaje:C++
     1409  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1410
     1411 == Función '''RandIWishart''' ==
     1412  * Declaración:
     1413{{{
     1414Matrix RandIWishart(Real v, Matrix S)
     1415}}}
     1416  * Descripción:
     1417{{{
     1418Random Wishart (mu, S).
     1419Si W es InvWishart(mu,S) entonces W^{-1} es Wishart(mu, S^{-1})
     1420}}}
     1421  * Lenguaje:C++
     1422  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1423
     1424 == Función '''RandMultinomial''' ==
     1425  * Declaración:
     1426{{{
     1427Matrix RandMultinomial(Real filas, Real N, Matrix p)
     1428}}}
     1429  * Descripción:
     1430{{{
     1431Devuelve una matriz de filas distribuidas como multinomiales con tamaño poblacional <N> y vector de probabilidades <p>
     1432.Esta funcion llama a la funcion GSL gsl_ran_multinomial: http://www.network-theory.co.uk/docs/gslref/TheMultinomialDistribution.html
     1433}}}
     1434  * Lenguaje:C++
     1435  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1436
     1437 == Función '''RandPermutation''' ==
     1438  * Declaración:
     1439{{{
     1440Matrix RandPermutation(Real m, Real n)
     1441}}}
     1442  * Descripción:
     1443{{{
     1444Devuelve una matriz con m permutaciones de n numeros.
     1445}}}
     1446  * Lenguaje:C++
     1447  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1448
     1449 == Función '''RandRectangleMNormal''' ==
     1450  * Declaración:
     1451{{{
     1452Matrix RandRectangleMNormal(Matrix mu, Anything COV, Matrix corner1, Matrix corner2 [, Real s2=1, Real size=1])
     1453}}}
     1454  * Descripción:
     1455{{{
     1456Realiza una muestra a partir de una multinormal truncada donde la zona de muestreo es el rectangulo multidimensional definido por las esquinas c1,c2. El parametro 'size' indica el tamaño de la cadena.
     1457La matriz de covarianza COV puede especificarse en diversas formas:
     1458  Matrix COV : iternamente se usa cholesky para descomponer la matrix
     1459  [[Text "FULL_CHOL" Matrix COV]] : iternamente se usa cholesky para descomponer la matrix, es similar a dar solo Matrix COV
     1460  [[Text "FACT_CHOL" Matrix L]] : se asume que COV = L*L'  [[Text "FACT_ICHOL" Matrix L]] :  se asume que COV^-1 = L*L'  [[Text "FULL_SVD" Matrix COV]] : se usa SVD internamente para descomponer COV  [[Text "FACT_SVD" Matrix L]] :  se asume que COV = V*W^2*V'  [[Text "FACT_ISVD" Matrix L]] :  se asume que COV^-1 = V*W^2*V  [[Text "DIAG", D]] : se asume que COV es una matriz diagonal siendo D un vector columna con los elementos de la diagonal de COV.
     1461
     1462Las matrices diagonales D o W se pueden especificar como vectores filas o columnas o como matriz cuadrada de la cual solo la diagonal es considerada.
     1463
     1464Ejemplo:
     1465
     1466    Matrix mu = Col(0.0, 2.0);
     1467    Matrix COV = ((1.0, 4/5.0),(4/5.0, 1.0));
     1468    Matrix c1 = Col(-1.0, 0.5);
     1469    Matrix c2 = Col(1.0, 1.5);
     1470    Matrix MCsample = RandRectangleMNormal(mu, COV, c1, c2, 1, 100);
     1471}}}
     1472  * Lenguaje:C++
     1473  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1474
     1475 == Función '''RandTruncatedMultNormal''' ==
     1476  * Declaración:
     1477{{{
     1478Matrix RandTruncatedMultNormal(Matrix mu, Matrix L, Matrix corner1, Matrix corner2, [Real s2=1, Real size=1, Real test=true])
     1479}}}
     1480  * Descripción:
     1481{{{
     1482Realiza una muestra a partir de una multinormal truncada donde la zona de muestreo es el rectangulo multidimensional definido por las esquinas c1,c2.
     1483Por razones de eficiencia la matriz de covarianzas viene dada por la descomposicion triangular cov=L*Tra(L)
     1484El parametro 'size' indica el tamaño de la cadena.
     1485Si L es la matriz 1x1 con el elemento 1 entonces la matriz de covarianzas se asumira unitaria.
     1486Si test==Cierto la funcion chequeara que todos los valores devueltos cumplen las restricciones
     1487.Ejemplo:
     1488
     1489    Matrix mu  = Col(0, 2);
     1490    Matrix Cov = ((1, 4/5),(4/5, 1));
     1491    Matrix L   = Choleski(Cov);
     1492    Matrix c1  = Col(-1, 0.5);
     1493    Matrix c2  = Col( 1, 1.5);
     1494    Matrix MCsample = RandTruncatedMultNormal(mu, L, c1, c2, 1, 100);
     1495
     1496
     1497}}}
     1498  * Lenguaje:C++
     1499  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1500
     1501 == Función '''RandWishart''' ==
     1502  * Declaración:
     1503{{{
     1504Matrix RandWishart(Real v, Matrix S)
     1505}}}
     1506  * Descripción:
     1507{{{
     1508Random Wishart (mu, S).
     1509Es el mismo ointerfaz que en Gelman et al., p574
     1510}}}
     1511  * Lenguaje:C++
     1512  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1513
     1514 == Función '''RegressionCoef''' ==
     1515  * Declaración:
     1516{{{
     1517Matrix RegressionCoef(Matrix s)
     1518}}}
     1519  * Descripción:
     1520{{{
     1521Devuelve la matriz de regresion entre las filas de una matriz.
     1522}}}
     1523  * Lenguaje:C++
     1524  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1525
     1526 == Función '''Reverse''' ==
     1527  * Declaración:
     1528{{{
     1529Matrix Reverse(Matrix mat)
     1530}}}
     1531  * Descripción:
     1532{{{
     1533Devuelve la matriz con las filas y columnas en orden inverso.
     1534}}}
     1535  * Lenguaje:C++
     1536  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1537
     1538 == Función '''Round''' ==
     1539  * Declaración:
     1540{{{
     1541Matrix Round(Matrix mat)
     1542}}}
     1543  * Descripción:
     1544{{{
     1545Devuelve el valor redondeado de cada elemento de una matriz.
     1546}}}
     1547  * Lenguaje:C++
     1548  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1549
     1550 == Función '''Row''' ==
     1551  * Declaración:
     1552{{{
     1553Matrix Row(Real x1 [, Real x2, ...])
     1554}}}
     1555  * Descripción:
     1556{{{
     1557Crea una matriz fila [[x1,x2,...,xn]].
     1558}}}
     1559  * Lenguaje:C++
     1560  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1561
     1562 == Función '''RowPivots''' ==
     1563  * Declaración:
     1564{{{
     1565Matrix RowPivots(Matrix x)
     1566}}}
     1567  * Descripción:
     1568{{{
     1569Devuelve una matriz con el indice del elemento de maximo valor absoluto para cada columna.
     1570}}}
     1571  * Lenguaje:C++
     1572  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1573
     1574 == Función '''SerFrequency''' ==
     1575  * Declaración:
     1576{{{
     1577Matrix SerFrequency(Serie ser, Real partes [, Real min, Real max])
     1578}}}
     1579  * Descripción:
     1580{{{
     1581Hace un analisis de frecuencia de n intervalos para una serie S. Devuelve una matriz con dos columnas. En la primera columna contiene el limite superior de cada intervalo. En la segunda columna contiene el numero de valores de S que pertenecen a cada intervalo.
     1582}}}
     1583  * Lenguaje:C++
     1584  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1585
     1586 == Función '''SerMat''' ==
     1587  * Declaración:
     1588{{{
     1589Matrix SerMat(Serie ser)
     1590}}}
     1591  * Descripción:
     1592{{{
     1593Devuelve una matriz fila a partir de los datos de una serie.
     1594}}}
     1595  * Lenguaje:C++
     1596  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1597
     1598 == Función '''SerSetMat''' ==
     1599  * Declaración:
     1600{{{
     1601Matrix SerSetMat(Set s [, Date desde, Date hasta] )
     1602}}}
     1603  * Descripción:
     1604{{{
     1605Devuelve una matriz cuyas filas son los datos de las series de un conjunto.
     1606}}}
     1607  * Lenguaje:C++
     1608  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1609
     1610 == Función '''SetCol''' ==
     1611  * Declaración:
     1612{{{
     1613Matrix SetCol(Set s)
     1614}}}
     1615  * Descripción:
     1616{{{
     1617Devuelve una matriz columna a partir de un conjunto de reales.
     1618}}}
     1619  * Lenguaje:C++
     1620  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1621
     1622 == Función '''SetDiag''' ==
     1623  * Declaración:
     1624{{{
     1625Matrix SetDiag(Set diagValues)
     1626}}}
     1627  * Descripción:
     1628{{{
     1629Crea una matriz diagonal con los elementos de un conjunto de numeros reales.
     1630}}}
     1631  * Lenguaje:C++
     1632  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1633
     1634 == Función '''SetMat''' ==
     1635  * Declaración:
     1636{{{
     1637Matrix SetMat(Set s)
     1638}}}
     1639  * Descripción:
     1640{{{
     1641Devuelve una matriz a partir de un conjunto de conjuntos de numeros reales.
     1642}}}
     1643  * Lenguaje:C++
     1644  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1645
     1646 == Función '''SetRow''' ==
     1647  * Declaración:
     1648{{{
     1649Matrix SetRow(Set s)
     1650}}}
     1651  * Descripción:
     1652{{{
     1653Devuelve una matriz fila a partir de un conjunto de reales.
     1654}}}
     1655  * Lenguaje:C++
     1656  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1657
     1658 == Función '''SetSum''' ==
     1659  * Declaración:
     1660{{{
     1661Matrix SetSum(Set cto)
     1662}}}
     1663  * Descripción:
     1664{{{
     1665Devuelve el sumatorio de todas las matrices de un conjunto.
     1666}}}
     1667  * Lenguaje:C++
     1668  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1669
     1670 == Función '''SetTriang''' ==
     1671  * Declaración:
     1672{{{
     1673Matrix SetTriang(Matrix v, Text UPLOSI)
     1674}}}
     1675  * Descripción:
     1676{{{
     1677Convierte un vector fila en:
     1678  una matriz triangular superior si <UPLOSI>=="U"
     1679  una matriz triangular inferior si <UPLOSI>=="L"
     1680  una matriz simetrica si <UPLOSI>=="S"
     1681El tamaño del vector <v> debe ser un entero k tal que k=n*(n+1)/2, siendo n el tamaño de la matriz cuadrada resultante
     1682}}}
     1683  * Lenguaje:C++
     1684  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1685
     1686 == Función '''ShermanMorrisonInverse''' ==
     1687  * Declaración:
     1688{{{
     1689Matrix ShermanMorrisonInverse(Matrix M)
     1690}}}
     1691  * Descripción:
     1692{{{
     1693Aplica el metodo de Sherman-Morrison para invertir una matriz rala sin ceros en la diagonal.
     1694}}}
     1695  * Lenguaje:C++
     1696  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1697
     1698 == Función '''ShermanMorrisonPseudoInverse''' ==
     1699  * Declaración:
     1700{{{
     1701Matrix ShermanMorrisonPseudoInverse(Matrix M)
     1702}}}
     1703  * Descripción:
     1704{{{
     1705Aplica el metodo de Sherman-Morrison para invertir una matriz rala sin ceros en la diagonal.
     1706}}}
     1707  * Lenguaje:C++
     1708  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1709
     1710 == Función '''Sign''' ==
     1711  * Declaración:
     1712{{{
     1713Matrix Sign(Matrix mat)
     1714}}}
     1715  * Descripción:
     1716{{{
     1717Devuelve el signo de cada elemento de una matriz.
     1718}}}
     1719  * Lenguaje:C++
     1720  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1721
     1722 == Función '''Sin''' ==
     1723  * Declaración:
     1724{{{
     1725Matrix Sin(Matrix mat)
     1726}}}
     1727  * Descripción:
     1728{{{
     1729Devuelve el seno trigonometrico de cada elemento de una matriz.
     1730}}}
     1731  * Lenguaje:C++
     1732  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1733
     1734 == Función '''SinH''' ==
     1735  * Declaración:
     1736{{{
     1737Matrix SinH(Matrix mat)
     1738}}}
     1739  * Descripción:
     1740{{{
     1741Devuelve el seno hipergeometrico de cada elemento de una matriz.
     1742}}}
     1743  * Lenguaje:C++
     1744  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1745
     1746 == Función '''SliceSampler1D''' ==
     1747  * Declaración:
     1748{{{
     1749Matrix SliceSampler1D(Code logf, Real L, Real U [, Real x0=(L+U)/2, Real size=1, Real burn=0, Set data=Empty, Real w=1, Real m=+Inf])
     1750}}}
     1751  * Descripción:
     1752{{{
     1753
     1754}}}
     1755  * Lenguaje:C++
     1756  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1757
     1758 == Función '''Solve''' ==
     1759  * Declaración:
     1760{{{
     1761Matrix Solve(Matrix M, Matrix B)
     1762}}}
     1763  * Descripción:
     1764{{{
     1765Aplica el metodo de reduccion de Gauss para resolver el sistema lineal M*X=B.
     1766}}}
     1767  * Lenguaje:C++
     1768  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1769
     1770 == Función '''Sort''' ==
     1771  * Declaración:
     1772{{{
     1773Matrix Sort(Matrix mat, Set criterium)
     1774}}}
     1775  * Descripción:
     1776{{{
     1777Ordena las filas de una matriz dado un criterio mezclado de columnas ascendentes y descendentes. Por ejemplo, criterium=[[-2,3]] ordena por la segunda columna descendente y por la tercera ascendente en caso de empate.Devuelve la matriz de permutación tal que PivotByRows(mat,p) es la matriz ordenada.
     1778}}}
     1779  * Lenguaje:C++
     1780  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1781
     1782 == Función '''SpectralDensity''' ==
     1783  * Declaración:
     1784{{{
     1785Matrix SpectralDensity(Matrix acor, Real periodicidad, Real partes)
     1786}}}
     1787  * Descripción:
     1788{{{
     1789Devuelve la funcion de densidad espectral de las autocorrelaciones.
     1790}}}
     1791  * Lenguaje:C++
     1792  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1793
     1794 == Función '''SqRt''' ==
     1795  * Declaración:
     1796{{{
     1797Matrix SqRt(Matrix mat)
     1798}}}
     1799  * Descripción:
     1800{{{
     1801Devuelve la raiz cuadrada de cada elemento de una matriz.
     1802}}}
     1803  * Lenguaje:C++
     1804  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1805
     1806 == Función '''Sqrt''' ==
     1807  * Declaración:
     1808{{{
     1809Matrix Sqrt(Matrix mat)
     1810}}}
     1811  * Descripción:
     1812{{{
     1813Devuelve la raiz cuadrada de cada elemento de una matriz.
     1814}}}
     1815  * Lenguaje:C++
     1816  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     1817
     1818 == Función '''StdLib::ARIMAGetJacobian''' ==
     1819  * Declaración:
     1820{{{
     1821Matrix StdLib::ARIMAGetJacobian(Set mod)
     1822}}}
     1823  * Descripción:
     1824{{{
     1825
     1826}}}
     1827  * Lenguaje:TOL
     1828  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_general.tol stdlib/tol/math/stat/models/mle/arima/_fun_general.tol]
     1829
     1830 == Función '''StdLib::BLR''' ==
     1831  * Declaración:
     1832{{{
     1833Matrix StdLib::BLR(Set model, Real calls, Real burning, Text fileSample)
     1834}}}
     1835  * Descripción:
     1836{{{
     1837
     1838}}}
     1839  * Lenguaje:TOL
     1840  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_kernel.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_kernel.tol]
     1841
     1842 == Función '''StdLib::BLRC''' ==
     1843  * Declaración:
     1844{{{
     1845Matrix StdLib::BLRC(Set modelC, Real calls, Real burning, Text fileSample)
     1846}}}
     1847  * Descripción:
     1848{{{
     1849
     1850}}}
     1851  * Lenguaje:TOL
     1852  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blrc_kernel.tol stdlib/tol/math/stat/models/bayesian/linear/_blrc_kernel.tol]
     1853
     1854 == Función '''StdLib::BLRC_MHGenBetaBlock''' ==
     1855  * Declaración:
     1856{{{
     1857Matrix StdLib::BLRC_MHGenBetaBlock(Matrix BMat, Matrix SMat, Matrix JMat, Set data, Real idWs)
     1858}}}
     1859  * Descripción:
     1860{{{
     1861
     1862}}}
     1863  * Lenguaje:TOL
     1864  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blrc_kernel.tol stdlib/tol/math/stat/models/bayesian/linear/_blrc_kernel.tol]
     1865
     1866 == Función '''StdLib::BLRC_MHGenSigma2Block''' ==
     1867  * Declaración:
     1868{{{
     1869Matrix StdLib::BLRC_MHGenSigma2Block(Matrix SMat, Matrix BMat, Matrix JMat, Set data, Real idWs)
     1870}}}
     1871  * Descripción:
     1872{{{
     1873
     1874}}}
     1875  * Lenguaje:TOL
     1876  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blrc_kernel.tol stdlib/tol/math/stat/models/bayesian/linear/_blrc_kernel.tol]
     1877
     1878 == Función '''StdLib::BLR_GetHiperBlock''' ==
     1879  * Declaración:
     1880{{{
     1881Matrix StdLib::BLR_GetHiperBlock(Set allParamNames, Set sheets, Text hpName)
     1882}}}
     1883  * Descripción:
     1884{{{
     1885
     1886}}}
     1887  * Lenguaje:TOL
     1888  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_add.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_add.tol]
     1889
     1890 == Función '''StdLib::BLR_H''' ==
     1891  * Declaración:
     1892{{{
     1893Matrix StdLib::BLR_H(Set model, Set hierSet, Real calls, Real burning, Text fileSample)
     1894}}}
     1895  * Descripción:
     1896{{{
     1897Regresión lineal a bayesiana con información a priori en los
     1898parametros y jerarquia.
     1899}}}
     1900  * Lenguaje:TOL
     1901  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_add.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_add.tol]
     1902
     1903 == Función '''StdLib::BLR_LinConBlock''' ==
     1904  * Declaración:
     1905{{{
     1906Matrix StdLib::BLR_LinConBlock(Set allParamNames, Set outConNames, Set inpConNames, Matrix X)
     1907}}}
     1908  * Descripción:
     1909{{{
     1910
     1911}}}
     1912  * Lenguaje:TOL
     1913  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_add.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_add.tol]
     1914
     1915 == Función '''StdLib::BLR_MHGenBetaBlock''' ==
     1916  * Declaración:
     1917{{{
     1918Matrix StdLib::BLR_MHGenBetaBlock(Matrix BMat, Matrix SMat, Matrix JMat, Set data, Real idWs)
     1919}}}
     1920  * Descripción:
     1921{{{
     1922
     1923}}}
     1924  * Lenguaje:TOL
     1925  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_kernel.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_kernel.tol]
     1926
     1927 == Función '''StdLib::BLR_MHGenSigma2Block''' ==
     1928  * Declaración:
     1929{{{
     1930Matrix StdLib::BLR_MHGenSigma2Block(Matrix SMat, Matrix BMat, Matrix JMat, Set data, Real idWs)
     1931}}}
     1932  * Descripción:
     1933{{{
     1934
     1935}}}
     1936  * Lenguaje:TOL
     1937  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_kernel.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_kernel.tol]
     1938
     1939 == Función '''StdLib::BLR_P''' ==
     1940  * Declaración:
     1941{{{
     1942Matrix StdLib::BLR_P(Set model, Real calls, Real burning, Text fileSample)
     1943}}}
     1944  * Descripción:
     1945{{{
     1946Regresión lineal a bayesiana con información a priori en los
     1947parametros
     1948}}}
     1949  * Lenguaje:TOL
     1950  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_add.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_add.tol]
     1951
     1952 == Función '''StdLib::BProbit''' ==
     1953  * Declaración:
     1954{{{
     1955Matrix StdLib::BProbit(Matrix Y, Matrix X, Set inputDef, Set hierSet, Set linSet, Real calls, Real burning, Text fileSample)
     1956}}}
     1957  * Descripción:
     1958{{{
     1959
     1960}}}
     1961  * Lenguaje:TOL
     1962  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/generalized_linear/_bprobit.tol stdlib/tol/math/stat/models/bayesian/generalized_linear/_bprobit.tol]
     1963
     1964 == Función '''StdLib::BProbit_MHGenBetaBlock''' ==
     1965  * Declaración:
     1966{{{
     1967Matrix StdLib::BProbit_MHGenBetaBlock(Matrix BMat, Matrix OMat, Matrix JMat, Set data)
     1968}}}
     1969  * Descripción:
     1970{{{
     1971
     1972}}}
     1973  * Lenguaje:TOL
     1974  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/generalized_linear/_bprobit.tol stdlib/tol/math/stat/models/bayesian/generalized_linear/_bprobit.tol]
     1975
     1976 == Función '''StdLib::BProbit_MHGenOmegaBlock''' ==
     1977  * Declaración:
     1978{{{
     1979Matrix StdLib::BProbit_MHGenOmegaBlock(Matrix OMat, Matrix BMat, Matrix JMat, Set data)
     1980}}}
     1981  * Descripción:
     1982{{{
     1983
     1984}}}
     1985  * Lenguaje:TOL
     1986  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/generalized_linear/_bprobit.tol stdlib/tol/math/stat/models/bayesian/generalized_linear/_bprobit.tol]
     1987
     1988 == Función '''StdLib::BysMcmc::Inference::loadMcmc''' ==
     1989  * Declaración:
     1990{{{
     1991Matrix StdLib::BysMcmc::Inference::loadMcmc(Text path, Real burnin, Real length, Real thinning)
     1992}}}
     1993  * Descripción:
     1994{{{
     1995
     1996}}}
     1997  * Lenguaje:TOL
     1998  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/bysMcmc/_inference_functions.tol stdlib/tol/math/stat/models/bayesian/bysMcmc/_inference_functions.tol]
     1999
     2000 == Función '''StdLib::CoPro''' ==
     2001  * Declaración:
     2002{{{
     2003Matrix StdLib::CoPro(Matrix mat1, Matrix mat2, Real min)
     2004}}}
     2005  * Descripción:
     2006{{{
     2007Matrix CoPro (Matrix mat1, Matrix mat2, Real min):
     2008Retorna la matriz que por entradas tiene el producto de las entradas de las matrixes <mat1> y <mat2>.
     2009El argumento <min> tiene el siguiente significado:
     2010           - Si min=0, indica que el usuario sabe que las matrices tienen todas sus entradas positivas.(Mas rapido).
     2011           - Si min<0, el usuario sabe que el minimo de las entradas de las dos matrices es <min>.(Velocidad intermedia).
     2012           - Si min>0, indica que el usuario no sabe el minimo de las entradas de las dos matrices.(Mas lento).
     2013
     2014 (Nota: Se usa la funcion Real MinMatrix() de las libreria common)
     2015}}}
     2016  * Lenguaje:TOL
     2017  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2018
     2019 == Función '''StdLib::CoProL''' ==
     2020  * Declaración:
     2021{{{
     2022Matrix StdLib::CoProL(Matrix M1, Matrix M2)
     2023}}}
     2024  * Descripción:
     2025{{{
     2026
     2027}}}
     2028  * Lenguaje:TOL
     2029  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2030
     2031 == Función '''StdLib::ColDiag''' ==
     2032  * Declaración:
     2033{{{
     2034Matrix StdLib::ColDiag(Matrix col)
     2035}}}
     2036  * Descripción:
     2037{{{
     2038Dada una matriz columna de tamaño n devuevle una matriz
     2039cuadrada con elementos en la diagonal a[ii]=col[i].
     2040
     2041Por ejemplo:
     2042Matrix col = Col(1,2,3);
     2043Matrix a   = ColDiag(col);
     2044}}}
     2045  * Lenguaje:TOL
     2046  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2047
     2048 == Función '''StdLib::ConcatSetCols''' ==
     2049  * Declaración:
     2050{{{
     2051Matrix StdLib::ConcatSetCols(Set cols)
     2052}}}
     2053  * Descripción:
     2054{{{
     2055Matrix ConcatSetCols (Set cols):
     2056Retorna la matriz resultado de concatenar los vectores columna del conjunto <cols>.
     2057}}}
     2058  * Lenguaje:TOL
     2059  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2060
     2061 == Función '''StdLib::ConcatSetRows''' ==
     2062  * Declaración:
     2063{{{
     2064Matrix StdLib::ConcatSetRows(Set rows)
     2065}}}
     2066  * Descripción:
     2067{{{
     2068Matrix ConcatSetRows (Set rows):
     2069Retorna la matriz resultado de concatenar los vectores fila del conjunto <rows>.
     2070}}}
     2071  * Lenguaje:TOL
     2072  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2073
     2074 == Función '''StdLib::CovMat''' ==
     2075  * Declaración:
     2076{{{
     2077Matrix StdLib::CovMat(Set setSer)
     2078}}}
     2079  * Descripción:
     2080{{{
     2081
     2082Devuelve la Matriz de Varianzas-Covarianzas de un conjunto de series.
     2083}}}
     2084  * Lenguaje:TOL
     2085  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2086
     2087 == Función '''StdLib::EvFromInitValues''' ==
     2088  * Declaración:
     2089{{{
     2090Matrix StdLib::EvFromInitValues(Set X)
     2091}}}
     2092  * Descripción:
     2093{{{
     2094
     2095}}}
     2096  * Lenguaje:TOL
     2097  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_general.tol stdlib/tol/math/stat/models/mle/arima/_fun_general.tol]
     2098
     2099 == Función '''StdLib::ForMat''' ==
     2100  * Declaración:
     2101{{{
     2102Matrix StdLib::ForMat(Real rows, Real columns, Code fun)
     2103}}}
     2104  * Descripción:
     2105{{{
     2106Devuelve una matriz con las dimensiones dadas y los valores generados por la funcion indicada, la cual toma dos argumentos reales correspondientes a las coordenadas (i,j) y devuelve el elemento (i,j) de la matriz.
     2107Ejemplo :
     2108Matrix ForMat(2, 3, Real (Real n, Real m){n*m});
     2109}}}
     2110  * Lenguaje:TOL
     2111  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2112
     2113 == Función '''StdLib::FreqRel''' ==
     2114  * Declaración:
     2115{{{
     2116Matrix StdLib::FreqRel(Matrix M, Real sample, Real ini, Real end)
     2117}}}
     2118  * Descripción:
     2119{{{
     2120Calcula la frecuencia relativa de los elementos de una
     2121matriz columna y retorna una matriz con las siguientes columnas:
     2122- Extremos superiores de cada intervalo
     2123- Frecuencia relativa de cada intervalo
     2124- Probabilidad acumulada
     2125- 1- Probabilidad acumulada.
     2126}}}
     2127  * Lenguaje:TOL
     2128  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2129
     2130 == Función '''StdLib::FreqRelSql''' ==
     2131  * Declaración:
     2132{{{
     2133Matrix StdLib::FreqRelSql(Text qry, Real sample, Real ini, Real end)
     2134}}}
     2135  * Descripción:
     2136{{{
     2137Calcula la frecuencia relativa de los elementos de una
     2138matriz columna.
     2139}}}
     2140  * Lenguaje:TOL
     2141  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2142
     2143 == Función '''StdLib::FrequencySql''' ==
     2144  * Declaración:
     2145{{{
     2146Matrix StdLib::FrequencySql(Text qry, Real sample, Real ini, Real fin)
     2147}}}
     2148  * Descripción:
     2149{{{
     2150Hace un análisis de frecuencia de sample intervalos para una
     2151query que devuelve una columna con nombre k. Devuelve una matriz con dos
     2152columnas. En la primera columna contiene el límite superior de cada intervalo.
     2153En la segunda columna contiene el número de valores de M que pertenecen a
     2154cada intervalo.
     2155}}}
     2156  * Lenguaje:TOL
     2157  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2158
     2159 == Función '''StdLib::FullWithZeroCol''' ==
     2160  * Declaración:
     2161{{{
     2162Matrix StdLib::FullWithZeroCol(Matrix a, Real ini, Real lon)
     2163}}}
     2164  * Descripción:
     2165{{{
     2166
     2167}}}
     2168  * Lenguaje:TOL
     2169  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_functions.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_functions.tol]
     2170
     2171 == Función '''StdLib::FullWithZeroRow''' ==
     2172  * Declaración:
     2173{{{
     2174Matrix StdLib::FullWithZeroRow(Matrix a, Real ini, Real lon)
     2175}}}
     2176  * Descripción:
     2177{{{
     2178
     2179}}}
     2180  * Lenguaje:TOL
     2181  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_functions.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_functions.tol]
     2182
     2183 == Función '''StdLib::FullWithZeroSquare''' ==
     2184  * Declaración:
     2185{{{
     2186Matrix StdLib::FullWithZeroSquare(Matrix a, Real ini, Real lon)
     2187}}}
     2188  * Descripción:
     2189{{{
     2190
     2191}}}
     2192  * Lenguaje:TOL
     2193  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_functions.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_functions.tol]
     2194
     2195 == Función '''StdLib::FunArMat''' ==
     2196  * Declaración:
     2197{{{
     2198Matrix StdLib::FunArMat(Polyn ar, Matrix z, Real n)
     2199}}}
     2200  * Descripción:
     2201{{{
     2202Aplica un Polyn ar a una Matrix z
     2203}}}
     2204  * Lenguaje:TOL
     2205  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2206
     2207 == Función '''StdLib::IncludeMatrix''' ==
     2208  * Declaración:
     2209{{{
     2210Matrix StdLib::IncludeMatrix(Text file)
     2211}}}
     2212  * Descripción:
     2213{{{
     2214Devuelve la matriz del fichero file.
     2215}}}
     2216  * Lenguaje:TOL
     2217  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2218
     2219 == Función '''StdLib::MEvalDerTransfor''' ==
     2220  * Declaración:
     2221{{{
     2222Matrix StdLib::MEvalDerTransfor(Set trans, Matrix x)
     2223}}}
     2224  * Descripción:
     2225{{{
     2226
     2227}}}
     2228  * Lenguaje:TOL
     2229  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_transformation.tol stdlib/tol/math/stat/models/mle/arima/_fun_transformation.tol]
     2230
     2231 == Función '''StdLib::MEvalInvTransfor''' ==
     2232  * Declaración:
     2233{{{
     2234Matrix StdLib::MEvalInvTransfor(Set trans, Matrix x)
     2235}}}
     2236  * Descripción:
     2237{{{
     2238
     2239}}}
     2240  * Lenguaje:TOL
     2241  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_transformation.tol stdlib/tol/math/stat/models/mle/arima/_fun_transformation.tol]
     2242
     2243 == Función '''StdLib::MEvalTransfor''' ==
     2244  * Declaración:
     2245{{{
     2246Matrix StdLib::MEvalTransfor(Set trans, Matrix x)
     2247}}}
     2248  * Descripción:
     2249{{{
     2250
     2251}}}
     2252  * Lenguaje:TOL
     2253  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_transformation.tol stdlib/tol/math/stat/models/mle/arima/_fun_transformation.tol]
     2254
     2255 == Función '''StdLib::MInvSVD''' ==
     2256  * Declaración:
     2257{{{
     2258Matrix StdLib::MInvSVD(Matrix mat)
     2259}}}
     2260  * Descripción:
     2261{{{
     2262
     2263}}}
     2264  * Lenguaje:TOL
     2265  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/arima/_bmtsarima.tol stdlib/tol/math/stat/models/bayesian/arima/_bmtsarima.tol]
     2266
     2267 == Función '''StdLib::MLH_Cov''' ==
     2268  * Declaración:
     2269{{{
     2270Matrix StdLib::MLH_Cov(Set resSet, TimeSet tms)
     2271}}}
     2272  * Descripción:
     2273{{{
     2274Retorna la matriz de covarianzas de un conjunto de series en
     2275diferentes fechados armonicos entre si y diferentes fechas entre ellos, pero
     2276con algun solapamiento entre las fechas de máximo y minimo.
     2277
     2278Observese que:
     2279Cov'(x,y) = (n/Nxy)*[Cov(x,y)+E[x]E[y]-Nxy*n*E[x]*E[y]/(Nx*Ny))
     2280
     2281Con Cov'(x,y) = (1/Nxy)*Suma(x*y)-((1/Nx)*Suma(x))*((1/Ny)*Suma(x))
     2282    E[x]      = (1/n)*Suma(x)
     2283    E[y]      = (1/n)*Suma(y)   
     2284    Cov(x,y)  = (1/n)*Suma(x*y)-((1/n)*Suma(x))*((1/n)*Suma(x))
     2285
     2286}}}
     2287  * Lenguaje:TOL
     2288  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_combination.tol stdlib/tol/math/stat/models/mle/arima/_fun_combination.tol]
     2289
     2290 == Función '''StdLib::MLH_IdTrans_LinRel''' ==
     2291  * Declaración:
     2292{{{
     2293Matrix StdLib::MLH_IdTrans_LinRel(Matrix nu, Matrix cov, Matrix matB, Matrix b)
     2294}}}
     2295  * Descripción:
     2296{{{
     2297Devuelve el vector media de la distribucion condicional de un sistema
     2298de regresion lineal z = nu + e con e distribuido como N(0, cov) y restriccion
     2299lineal dada por Bz = b
     2300}}}
     2301  * Lenguaje:TOL
     2302  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_combination.tol stdlib/tol/math/stat/models/mle/arima/_fun_combination.tol]
     2303
     2304 == Función '''StdLib::MLH_Trans_LinRel''' ==
     2305  * Declaración:
     2306{{{
     2307Matrix StdLib::MLH_Trans_LinRel(Code t1, Code t1Inv, Code t2, Code t2Inv, Matrix nuZ1, Matrix nuZ2, Matrix cov, Matrix matA, Matrix a, Real show)
     2308}}}
     2309  * Descripción:
     2310{{{
     2311Retorna el vector maximo-verosimil de un modelo no lineal
     2312de la forma:
     2313 T1(z1) = T1(nuZ1)+E1
     2314 T2(z2) = T2(nuZ2)+E2
     2315Con  (E1, E2) -> N(0, cov) y z2 = a+matA*z1
     2316}}}
     2317  * Lenguaje:TOL
     2318  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_combination.tol stdlib/tol/math/stat/models/mle/arima/_fun_combination.tol]
     2319
     2320 == Función '''StdLib::MLH_Trans_Rel''' ==
     2321  * Declaración:
     2322{{{
     2323Matrix StdLib::MLH_Trans_Rel(Code t1, Code t1Inv, Code t2, Code t2Inv, Matrix nuZ1, Matrix nuZ2, Matrix cov, Code rel, Set paramSet, Real show)
     2324}}}
     2325  * Descripción:
     2326{{{
     2327Retorna el vector maximo-verosimil de un modelo no lineal
     2328de la forma:
     2329 T1(z1) = T1(nuZ1)+E1
     2330 T2(z2) = T2(nuZ2)+E2
     2331Con  (E1, E2) -> N(0, cov) y z2 = rel(z1). La funcion rel es una funcion
     2332Matrix (Matrix z1), es decir una aplicacion vectorial rel:R^n1->R^m2, con
     2333Rows(z2)=m2 y Rows(z1)=m1.
     2334}}}
     2335  * Lenguaje:TOL
     2336  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_combination.tol stdlib/tol/math/stat/models/mle/arima/_fun_combination.tol]
     2337
     2338 == Función '''StdLib::MSVD''' ==
     2339  * Declaración:
     2340{{{
     2341Matrix StdLib::MSVD(Matrix mat)
     2342}}}
     2343  * Descripción:
     2344{{{
     2345
     2346}}}
     2347  * Lenguaje:TOL
     2348  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/arima/_bmtsarima.tol stdlib/tol/math/stat/models/bayesian/arima/_bmtsarima.tol]
     2349
     2350 == Función '''StdLib::MatCorrSetSer''' ==
     2351  * Declaración:
     2352{{{
     2353Matrix StdLib::MatCorrSetSer(Set s)
     2354}}}
     2355  * Descripción:
     2356{{{
     2357
     2358Crea la matriz de correlaciones de un conjunto de series.
     2359}}}
     2360  * Lenguaje:TOL
     2361  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2362
     2363 == Función '''StdLib::MatDiag''' ==
     2364  * Declaración:
     2365{{{
     2366Matrix StdLib::MatDiag(Matrix mat)
     2367}}}
     2368  * Descripción:
     2369{{{
     2370
     2371Devuelve la matriz diagonal de la matrix que recibe.
     2372}}}
     2373  * Lenguaje:TOL
     2374  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2375
     2376 == Función '''StdLib::MatSetSeries''' ==
     2377  * Declaración:
     2378{{{
     2379Matrix StdLib::MatSetSeries(Set setSer)
     2380}}}
     2381  * Descripción:
     2382{{{
     2383
     2384Devuelve una matriz a partir de un conjunto de series desde el mayor de los
     2385inicion al menor de los finales
     2386}}}
     2387  * Lenguaje:TOL
     2388  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2389
     2390 == Función '''StdLib::MatTriInf''' ==
     2391  * Declaración:
     2392{{{
     2393Matrix StdLib::MatTriInf(Matrix mat)
     2394}}}
     2395  * Descripción:
     2396{{{
     2397
     2398}}}
     2399  * Lenguaje:TOL
     2400  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2401
     2402 == Función '''StdLib::MatTriSup''' ==
     2403  * Declaración:
     2404{{{
     2405Matrix StdLib::MatTriSup(Matrix mat)
     2406}}}
     2407  * Descripción:
     2408{{{
     2409
     2410Devuelve la matriz triangular inferior de una matriz cuadrada.
     2411}}}
     2412  * Lenguaje:TOL
     2413  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2414
     2415 == Función '''StdLib::MatUnkInd''' ==
     2416  * Declaración:
     2417{{{
     2418Matrix StdLib::MatUnkInd(Matrix mat)
     2419}}}
     2420  * Descripción:
     2421{{{
     2422Retorna una matriz indicadora con 1 si hay ? en mat y 0 en
     2423otro caso (incluyendo 1/0 y -1/0).
     2424}}}
     2425  * Lenguaje:TOL
     2426  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2427
     2428 == Función '''StdLib::MatrixEval''' ==
     2429  * Declaración:
     2430{{{
     2431Matrix StdLib::MatrixEval(Code function, Matrix x, Set param)
     2432}}}
     2433  * Descripción:
     2434{{{
     2435
     2436}}}
     2437  * Lenguaje:TOL
     2438  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/mle/arima/_fun_transformation.tol stdlib/tol/math/stat/models/mle/arima/_fun_transformation.tol]
     2439
     2440 == Función '''StdLib::NumericJacobian''' ==
     2441  * Declaración:
     2442{{{
     2443Matrix StdLib::NumericJacobian(Set X, Matrix Y, Code evalFun, Real tolerance)
     2444}}}
     2445  * Descripción:
     2446{{{
     2447
     2448}}}
     2449  * Lenguaje:TOL
     2450  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/optim/_marquardt.tol stdlib/tol/math/optim/_marquardt.tol]
     2451
     2452 == Función '''StdLib::RCODA::raftery.diag''' ==
     2453  * Declaración:
     2454{{{
     2455Matrix StdLib::RCODA::raftery.diag(Anything data, Set optArgs)
     2456}}}
     2457  * Descripción:
     2458{{{
     2459Function RCODA::raftery.diag is a TOL port to R function raftery.diag {coda}
     2460
     2461URL: http://cran.r-project.org/doc/packages/coda.pdf
     2462
     2463Description
     2464raftery.diag is a run length control diagnostic based on a criterion of accuracy of estimation of the quantile q. It is intended for use on a short pilot run of a Markov chain. The number of iterations required to estimate the quantile q to within an accuracy of +/- r with probability p is calculated. Separate calculations are performed for each variable within each chain.
     2465If the number of iterations in data is too small, an error message is printed indicating the minimum length of pilot run. The minimum length is the required sample size for a chain with no correlation between consecutive samples. Positive autocorrelation will increase the required sample size above this minimum value. An estimate I (the `dependence factor') of the extent to which autocorrelation inflates the required sample size is also provided. Values of I larger than 5 indicate strong autocorrelation which may be due to a poor choice of starting value, high posterior correlations or `stickiness' of the MCMC algorithm.
     2466The number of `burn in' iterations to be discarded at the beginning of the chain is also calculated.
     2467
     2468Usage examples
     2469
     2470  Matrix RCODA::raftery.diag(data, {[[
     2471    Real verbose=FALSE,
     2472    Real varByCol=TRUE,
     2473    Real q=0.030,
     2474    Real r=0.006,
     2475    Real s=0.99,
     2476    Real eps=0.001]]})
     2477
     2478  Matrix RCODA::raftery.diag(data, {[[
     2479    Real varByCol=FALSE,
     2480    Real eps=0.0003]]})
     2481
     2482  Matrix RCODA::raftery.diag(data,Empty)
     2483
     2484Arguments
     2485  data: an mcmc object that could be a Matrix variable or a Text one with the path to a BBM file
     2486  optArgs: supplies optional arguments:
     2487    Real verbose: If TRUE some traces will be send to standard output    Real varByCol: If TRUE then each column contains the Markov Chain of a variable and each row has a simulation. In other case each row is a variable and each column is a simulationDefault value is TRUE
     2488    Real q: the quantile to be estimated. Default value is 0.025
     2489    Real r: the desired margin of error of the estimate.Default value is 0.005
     2490    Real s: the probability of obtaining an estimate in the interval (q-r,q+r). Default value is 0.95
     2491    Real eps: Precision required for estimate of time to convergence.Default value is 0.001
     2492
     2493Returns a matrix containing in each row the next information about each variable:
     2494  M the length of burn in,
     2495  N the required sample size,
     2496  Nmin the minimum sample size based on zero autocorrelation,
     2497  I = (M+N)/Nmin the dependence factor
     2498
     2499Acknowledgements:
     2500Martyn Plummer, Nicky Best, Kate Cowles and Karen Vines (2006). coda:Output analysis and diagnostics for MCMC. R package version 0.10-7.
     2501URL http://www-fis.iarc.fr/coda/
     2502
     2503}}}
     2504  * Lenguaje:TOL
     2505  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/diagnosis/_rcoda.tol stdlib/tol/math/stat/models/bayesian/diagnosis/_rcoda.tol]
     2506
     2507 == Función '''StdLib::Rkde::density''' ==
     2508  * Declaración:
     2509{{{
     2510Matrix StdLib::Rkde::density(Matrix sample, Set optArgs)
     2511}}}
     2512  * Descripción:
     2513{{{
     2514Rkde::density is a function to interface with the R function density
     2515
     2516URL http://www.R-project.org.
     2517
     2518Description
     2519The (S3) generic function density computes kernel density estimates. Its default method does so with the given kernel and bandwidth for univariate observations.
     2520
     2521Arguments:
     2522
     2523   sample: a vector with the sample data.
     2524
     2525   n: the number of equally spaced points at which the density is to be       estimated. When n > 512, it is rounded up to the next power of 2       for efficiency reasons (fft)..
     2526
     2527Return Value:
     2528
     2529     A matrix of two columns with (x,y) pairs of density evaluations
     2530};
     2531
     2532}}}
     2533  * Lenguaje:TOL
     2534  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/kde/_rkde.tol stdlib/tol/math/stat/kde/_rkde.tol]
     2535
     2536 == Función '''StdLib::SVDInverse''' ==
     2537  * Declaración:
     2538{{{
     2539Matrix StdLib::SVDInverse(Matrix a)
     2540}}}
     2541  * Descripción:
     2542{{{
     2543
     2544}}}
     2545  * Lenguaje:TOL
     2546  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/math/stat/models/bayesian/linear/_blr_functions.tol stdlib/tol/math/stat/models/bayesian/linear/_blr_functions.tol]
     2547
     2548 == Función '''StdLib::SerCorrelation''' ==
     2549  * Declaración:
     2550{{{
     2551Matrix StdLib::SerCorrelation(Set series)
     2552}}}
     2553  * Descripción:
     2554{{{
     2555
     2556}}}
     2557  * Lenguaje:TOL
     2558  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2559
     2560 == Función '''StdLib::SerCovarianze''' ==
     2561  * Declaración:
     2562{{{
     2563Matrix StdLib::SerCovarianze(Set series)
     2564}}}
     2565  * Descripción:
     2566{{{
     2567
     2568}}}
     2569  * Lenguaje:TOL
     2570  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2571
     2572 == Función '''StdLib::SetSerMatCorr''' ==
     2573  * Declaración:
     2574{{{
     2575Matrix StdLib::SetSerMatCorr(Set s)
     2576}}}
     2577  * Descripción:
     2578{{{
     2579
     2580}}}
     2581  * Lenguaje:TOL
     2582  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_serie.tol stdlib/tol/general/grammars/_serie.tol]
     2583
     2584 == Función '''StdLib::SqlEngine::SqlDBMatrix''' ==
     2585  * Declaración:
     2586{{{
     2587Matrix StdLib::SqlEngine::SqlDBMatrix(Text query, Real defectValue)
     2588}}}
     2589  * Descripción:
     2590{{{
     2591
     2592Llama a la funcion DBMatrix.
     2593}}}
     2594  * Lenguaje:TOL
     2595  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/data/db/engine/_ini_engine.tol stdlib/tol/data/db/engine/_ini_engine.tol]
     2596
     2597 == Función '''StdLib::SubMat''' ==
     2598  * Declaración:
     2599{{{
     2600Matrix StdLib::SubMat(Matrix mat, Set filas, Set columnas)
     2601}}}
     2602  * Descripción:
     2603{{{
     2604Retorna la submatriz de la matriz dada que tiene las
     2605filas y columnas argumento
     2606}}}
     2607  * Lenguaje:TOL
     2608  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2609
     2610 == Función '''StdLib::SubMatCond''' ==
     2611  * Declaración:
     2612{{{
     2613Matrix StdLib::SubMatCond(Matrix mat, Text filas, Text columnas)
     2614}}}
     2615  * Descripción:
     2616{{{
     2617Retorna la submatriz de la matriz argumento a través de
     2618condiciones dadas por os argumentos de texto para filas y columnas. Estos
     2619argumentos son sentencias tol que se evaluan y que deben servir de indicadores
     2620de pertenencia. Se usan variables <col> y <row> para hacer notar las columnas
     2621y filas a seleccionar. Por ejemplo:
     2622
     2623col == 1 y row>=5 selecciona la columna 1 y las filas mayores o iguales que 5.
     2624
     2625Solo sepueden color valores numéricos. Es decir no se pueden colocar
     2626expresiones como col>row.
     2627}}}
     2628  * Lenguaje:TOL
     2629  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2630
     2631 == Función '''StdLib::SubPos''' ==
     2632  * Declaración:
     2633{{{
     2634Matrix StdLib::SubPos(Matrix A, Real rows, Real cols)
     2635}}}
     2636  * Descripción:
     2637{{{
     2638Matrix SubPos (Matrix A, Real rows, Real cols) :
     2639Calcula la submatriz de la matriz <A> asociado a la posicion (<rows>,<cols>).
     2640}}}
     2641  * Lenguaje:TOL
     2642  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/stdlib/general/grammars/_matrix.tol stdlib/tol/general/grammars/_matrix.tol]
     2643
     2644 == Función '''Sub''' ==
     2645  * Declaración:
     2646{{{
     2647Matrix Sub(Matrix m, Real fila, Real columna, Real alto, Real ancho)
     2648}}}
     2649  * Descripción:
     2650{{{
     2651Extrae de la matriz la submatriz que comienza en la fila y la columna dadas y que tiene el alto y ancho indicados.
     2652}}}
     2653  * Lenguaje:C++
     2654  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2655
     2656 == Función '''SubCol''' ==
     2657  * Declaración:
     2658{{{
     2659Matrix SubCol(Matrix m , Set indiceDeColumnas)
     2660}}}
     2661  * Descripción:
     2662{{{
     2663Extrae de la matriz las columnas indicadas.
     2664}}}
     2665  * Lenguaje:C++
     2666  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2667
     2668 == Función '''SubDiag''' ==
     2669  * Declaración:
     2670{{{
     2671Matrix SubDiag(Matrix m, Real indiceDeDiagonal)
     2672}}}
     2673  * Descripción:
     2674{{{
     2675Extrae de la matriz la diagonal indicada. La diagonal principal es la de indice 0, las diagonales inferiores tienen indices negativos y las superiores los tienen positivos.
     2676}}}
     2677  * Lenguaje:C++
     2678  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2679
     2680 == Función '''SubRow''' ==
     2681  * Declaración:
     2682{{{
     2683Matrix SubRow(Matrix m , Set indiceDeFilas)
     2684}}}
     2685  * Descripción:
     2686{{{
     2687Extrae de la matriz las filas indicadas.
     2688}}}
     2689  * Lenguaje:C++
     2690  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2691
     2692 == Función '''SubTriang''' ==
     2693  * Declaración:
     2694{{{
     2695Matrix SubTriang(Matrix m, Text UPLO)
     2696}}}
     2697  * Descripción:
     2698{{{
     2699Extrae de la matriz <m> un vector fila conteniendo:
     2700  la parte triangular superior si <UPLO>=="U"
     2701  la parte triangular inferior si <UPLO>=="L"
     2702Si la matriz no es cuadrada silo se tendra en cuenta la submatriz menor principal.
     2703Si el tamaño de <m> es n entonces el tamaño del vector devuelto sera k=n*(n+1)/2
     2704Para restaurar la matriz triangular use SetTriang
     2705}}}
     2706  * Lenguaje:C++
     2707  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2708
     2709 == Función '''Tan''' ==
     2710  * Declaración:
     2711{{{
     2712Matrix Tan(Matrix mat)
     2713}}}
     2714  * Descripción:
     2715{{{
     2716Devuelve la tangente trigonometrica de cada elemento de una matriz.
     2717}}}
     2718  * Lenguaje:C++
     2719  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2720
     2721 == Función '''TanH''' ==
     2722  * Declaración:
     2723{{{
     2724Matrix TanH(Matrix mat)
     2725}}}
     2726  * Descripción:
     2727{{{
     2728Devuelve la tangente hipergeometrica de cada elemento de una matriz.
     2729}}}
     2730  * Lenguaje:C++
     2731  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2732
     2733 == Función '''TrSolve''' ==
     2734  * Declaración:
     2735{{{
     2736Matrix TrSolve(Matrix T, Matrix B [, Real left=1, Real trans=0, Real lower=1])
     2737}}}
     2738  * Descripción:
     2739{{{
     2740Resuelve un sistema de ecuaciones triangular.Es posible resolver diferentes tipos de sistemas dependiendo de los valores que tomen los argumentos opciones left, trans y lower.
     2741Si lower es verdadero entonces se resuelve un sistema triangular inferior en otro caso se resuelve un sistema triangular superior:
     2742
     2743L*X=B  si (left=1,trans=0,lower=1)
     2744L'*X=B si (left=1,trans=1,lower=1)
     2745X*L=B  si (left=0,trans=0,lower=1)
     2746X*L'=B si (left=0,trans=1,lower=1)
     2747
     2748U*X=B  si (left=1,trans=0,lower=0)
     2749U'*X=B si (left=1,trans=1,lower=0)
     2750X*U=B  si (left=0,trans=0,lower=0)
     2751X*U'=B si (left=0,trans=1,lower=0)
     2752}}}
     2753  * Lenguaje:C++
     2754  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2755
     2756 == Función '''Tra''' ==
     2757  * Declaración:
     2758{{{
     2759Matrix Tra(Matrix mat)
     2760}}}
     2761  * Descripción:
     2762{{{
     2763Devuelve la matriz traspuesta, es decir, el resultado de cambiar filas por columnas.
     2764}}}
     2765  * Lenguaje:C++
     2766  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2767
     2768 == Función '''TrasposePivots''' ==
     2769  * Declaración:
     2770{{{
     2771Matrix TrasposePivots(Matrix p, Real dim)
     2772}}}
     2773  * Descripción:
     2774{{{
     2775Devuelve una matriz con el indice del elemento de maximo valor absoluto para cada columna.
     2776}}}
     2777  * Lenguaje:C++
     2778  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2779
     2780 == Función '''UniKerDnsEstOptBnw''' ==
     2781  * Declaración:
     2782{{{
     2783Matrix UniKerDnsEstOptBnw(Matrix muestra, Matrix objetivos [, Real orden=0, Real numIter=0, Real epsilon=1.E-5])
     2784}}}
     2785  * Descripción:
     2786{{{
     2787UniKerDnsEstOptBnw es abreviatura de Univariate Kernel Density Estimation with Optimal Bandwith Un programa desarrollado por Vikas C. Raykar bajo la licencia Lessr GPL y disponible en
     2788  http://www.umiacs.umd.edu/~vikas/Software/optimal_bw/optimal_bw_code.htm
     2789Dado un vector <muestra> de realizaciones independientes de una variable aleatoria univariante esta función aproxima, en los objetivos marcados, la derivada de <orden> dado de la función de densidad correspondiente mediante el método Kernel Density Estimation (KDE) con función de núcleo normal y usando el criterio de optimalidad AMISE para la selección del ancho de banda. Si <orden> es 0 devuelve la densidad y si es mayor sus derivadas sucesivas. El argumento <epsilon> indica la tolerancia al error con respecto al método exacto que se desea obtener y cuanto mayor sea más rápido y menos exacto será el resultado.
     2790}}}
     2791  * Lenguaje:C++
     2792  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/contrib/optimal_bw/api_tol_optimal_bw.cpp tol/contrib/optimal_bw/api_tol_optimal_bw.cpp]
     2793
     2794 == Función '''VMat2Mat''' ==
     2795  * Declaración:
     2796{{{
     2797Matrix VMat2Mat(VMatrix data [, Real transpose=FALSE])
     2798}}}
     2799  * Descripción:
     2800{{{
     2801Convuerte una VMatrix o su traspuesta en una Marix.
     2802}}}
     2803  * Lenguaje:C++
     2804  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/vmatrix_type/vmatgra.cpp tol/btol/vmatrix_type/vmatgra.cpp]
     2805
     2806 == Función '''VMat2Triplet''' ==
     2807  * Declaración:
     2808{{{
     2809Matrix VMat2Triplet(VMatrix M [, Real transpose=FALSE])
     2810}}}
     2811  * Descripción:
     2812{{{
     2813Convuerte una VMatrix o su traspuesta en una Marix con tres columnas que en cada fila contiene una tripleta (i,j,M(i,j)).
     2814}}}
     2815  * Lenguaje:C++
     2816  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/vmatrix_type/vmatgra.cpp tol/btol/vmatrix_type/vmatgra.cpp]
     2817
     2818 == Función '''Vech''' ==
     2819  * Declaración:
     2820{{{
     2821Matrix Vech(Matrix mat)
     2822}}}
     2823  * Descripción:
     2824{{{
     2825Vec Operator.
     2826}}}
     2827  * Lenguaje:C++
     2828  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2829
     2830 == Función '''WeightProd''' ==
     2831  * Declaración:
     2832{{{
     2833Matrix WeightProd(Matrix mat1, Matrix mat2)
     2834}}}
     2835  * Descripción:
     2836{{{
     2837Devuelve la matriz de productos celda a celda mat1[i,j]*mat2[i,j].Ambas matrices deben tener las mismas dimensiones.Las siguientes dos expresiones son identicas y validas en TOL mat1$*at2==WeightProd(mat1,mat2)
     2838}}}
     2839  * Lenguaje:C++
     2840  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2841
     2842 == Función '''WeightQuotient''' ==
     2843  * Declaración:
     2844{{{
     2845Matrix WeightQuotient(Matrix mat1, Matrix mat2)
     2846}}}
     2847  * Descripción:
     2848{{{
     2849Devuelve la matriz de cocientes celda a celda mat1[i,j]/mat2[i,j].Ambas matrices deben tener las mismas dimensiones.Las siguientes dos expresiones son identicas y validas en TOL mat1$/at2==WeightQuotient(mat1,mat2)
     2850}}}
     2851  * Lenguaje:C++
     2852  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2853
     2854 == Función '''^''' ==
     2855  * Declaración:
     2856{{{
     2857Matrix mat ^ x {Matrix mat, Real x}
     2858}}}
     2859  * Descripción:
     2860{{{
     2861Devuelve la potencia de cada elemnto de una matriz a un numero real.
     2862}}}
     2863  * Lenguaje:C++
     2864  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2865
     2866 == Función '''f01''' ==
     2867  * Declaración:
     2868{{{
     2869Matrix f01(Matrix mat)
     2870}}}
     2871  * Descripción:
     2872{{{
     2873Devuelve la funcion de densidad normal estandar de cada celda de una matriz.
     2874}}}
     2875  * Lenguaje:C++
     2876  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2877
     2878 == Función '''|''' ==
     2879  * Declaración:
     2880{{{
     2881Matrix mat1 | mat2 {Matrix mat1 , Matrix mat2}
     2882}}}
     2883  * Descripción:
     2884{{{
     2885Concatena todas las columnas de dos matrices con el mismo numero de filas.
     2886}}}
     2887  * Lenguaje:C++
     2888  * Fuente : [https://www.tol-project.org/browser/tolp/trunk/tol/btol/matrix_type/matgra.cpp tol/btol/matrix_type/matgra.cpp]
     2889