Changeset 09bb52b in tol
- Timestamp:
- Mar 27, 2013, 11:01:02 AM (14 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 9b9575f
- Parents:
- b6c14f4
- Location:
- tol
- Files:
-
- 7 edited
-
bmath/bstat/stat.cpp (modified) (1 diff)
-
bmath/bstat/tol_bstat.h (modified) (1 diff)
-
btol/real_type/datgrast.cpp (modified) (18 diffs)
-
btol/real_type/datgsrst.cpp (modified) (7 diffs)
-
btol/real_type/tol_bdatgra.h (modified) (6 diffs)
-
btol/vmatrix_type/vmatgra.cpp (modified) (5 diffs)
-
lang/language.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/bmath/bstat/stat.cpp
rb6c14f4 r09bb52b 86 86 return((*stat)(x)); 87 87 } 88 //-------------------------------------------------------------------- 89 BDat Known(const BArray<BDat>& vec) 90 91 /*! Returns the Sum statistic of a vector of real numbers 92 */ 93 //-------------------------------------------------------------------- 94 { 95 if(!vec.Size()) { return(0); } 96 BDat result = 0; 97 for(BInt k = 0; k<vec.Size(); k++) 98 { 99 if(vec(k).IsKnown()) 100 { 101 result += 1; 102 } 103 } 104 return(result); 105 } 106 88 107 //-------------------------------------------------------------------- 89 108 BDat Sum(const BArray<BDat>& vec) -
tol/bmath/bstat/tol_bstat.h
rb6c14f4 r09bb52b 33 33 const BArray<BDat>& vec); 34 34 35 TOL_API BDat Known (const BArray<BDat>& vec); 35 36 TOL_API BDat Sum (const BArray<BDat>& vec); 36 37 TOL_API BDat Product (const BArray<BDat>& vec); -
tol/btol/real_type/datgrast.cpp
rb6c14f4 r09bb52b 153 153 154 154 //-------------------------------------------------------------------- 155 DeclareContensClass(BDat, BDatTemporary, BDatAs imetry);156 DefIntOpr(1, BDatAs imetry, "Asymmetry", 1, 0,155 DeclareContensClass(BDat, BDatTemporary, BDatAsymmetry); 156 DefIntOpr(1, BDatAsymmetry, "Asymmetry", 1, 0, 157 157 "(Real x1 [, Real x2, ...])", 158 158 I2("Returns the asymmetry ceficient of all arguments.", 159 159 "Devuelve el coeficiente de asimetría de todos sus argumentos."), 160 160 BOperClassify::Statistic_); 161 void BDatAs imetry::CalcContens()161 void BDatAsymmetry::CalcContens() 162 162 //-------------------------------------------------------------------- 163 163 { … … 320 320 321 321 //-------------------------------------------------------------------- 322 DeclareContensClass(BDat, BDatTemporary, BDatMatCount); 323 DefExtOpr(1, BDatMatCount, "MatCount", 1, 1, "Matrix", 324 "(Matrix mat)", 325 I2("Returns the number of cells of a matrix (rows x columns).", 326 "Devuelve el número de celdas de una matriz (filas x columnas)."), 327 BOperClassify::Statistic_); 328 void BDatMatCount::CalcContens() 329 //-------------------------------------------------------------------- 330 { 331 BMat& x = Mat(Arg(1)); 332 contens_ = x.Rows() * x.Columns(); 333 } 334 335 //-------------------------------------------------------------------- 336 DeclareContensClass(BDat, BDatTemporary, BDatMatKnown); 337 DefExtOpr(1, BDatMatKnown, "MatKnown", 1, 1, "Matrix", 338 "(Matrix mat)", 339 I2("Returns the number of cells of a matrix (rows x columns).", 340 "Devuelve el número de celdas de una matriz (filas x columnas)."), 341 BOperClassify::Statistic_); 342 void BDatMatKnown::CalcContens() 343 //-------------------------------------------------------------------- 344 { 345 BMat& x = Mat(Arg(1)); 346 contens_ = Known(x.Data()); 347 } 348 349 //-------------------------------------------------------------------- 350 DeclareContensClass(BDat, BDatTemporary, BDatSetKnown); 351 DefExtOpr(1, BDatSetKnown, "SetKnown", 1, 1, "Set", 352 I2("(Set set)","(Set cto)"), 353 I2("Returns the global sum of all elements of a set of numbers.", 354 "Devuelve el número de elementos no omitidos de un conjunto de números."), 355 BOperClassify::Statistic_); 356 void BDatSetKnown::CalcContens() 357 //-------------------------------------------------------------------- 358 { 359 BSet& set = Set(Arg(1)); 360 if(!CheckRealElement("SetSum",set)) { return; } 361 BArray<BDat> vec(set.Card()); 362 for(BInt n=0; n<vec.Size(); n++) 363 { 364 vec[n] = Dat(set[n+1]); 365 } 366 contens_ = Known(vec); 367 } 368 369 //-------------------------------------------------------------------- 322 370 DeclareContensClass(BDat, BDatTemporary, BDatSetSum); 323 371 DefExtOpr(1, BDatSetSum, "SetSum", 1, 1, "Set", 324 372 I2("(Set set)","(Set cto)"), 325 I2("Returns the global sum of all elements of a set .",326 "Devuelve el sumatorio de todos los elementos de un conjunto ."),373 I2("Returns the global sum of all elements of a set of numbers.", 374 "Devuelve el sumatorio de todos los elementos de un conjunto de números."), 327 375 BOperClassify::Statistic_); 328 376 void BDatSetSum::CalcContens() … … 339 387 } 340 388 341 342 389 //-------------------------------------------------------------------- 343 390 DeclareContensClass(BDat, BDatTemporary, BDatMatSum); … … 360 407 DefExtOpr(1, BDatSetProduct, "SetProd", 1, 1, "Set", 361 408 I2("(Set set)","(Set cto)"), 362 I2("Returns the global product of all elements of a set .",363 "Devuelve el productorio de todos los elementos de un conjunto ."),409 I2("Returns the global product of all elements of a set of numbers.", 410 "Devuelve el productorio de todos los elementos de un conjunto de números."), 364 411 BOperClassify::Statistic_); 365 412 void BDatSetProduct::CalcContens() … … 394 441 DefExtOpr(1, BDatSetMedian, "SetMedian", 1, 1, "Set", 395 442 I2("(Set set)","(Set cto)"), 396 I2("Returns the median of all elements of a set .",397 "Devuelve la mediana de todos los elementos de un conjunto ."),443 I2("Returns the median of all elements of a set of numbers.", 444 "Devuelve la mediana de todos los elementos de un conjunto de números."), 398 445 BOperClassify::Statistic_); 399 446 void BDatSetMedian::CalcContens() … … 428 475 DefExtOpr(1, BDatSetMin, "SetMin", 1, 1, "Set", 429 476 I2("(Set set)","(Set cto)"), 430 I2("Returns the minimum of all elements of a set .",431 "Devuelve la mínimo de todos los elementos de un conjunto."),477 I2("Returns the minimum of all elements of a set of numbers.", 478 "Devuelve el mínimo de todos los elementos de un conjunto de números."), 432 479 BOperClassify::Statistic_); 433 480 void BDatSetMin::CalcContens() … … 462 509 DefExtOpr(1, BDatSetMax, "SetMax", 1, 1, "Set", 463 510 I2("(Set set)","(Set cto)"), 464 I2("Returns the maximum of all elements of a set .",465 "Devuelve la máximo de todos los elementos de un conjunto ."),511 I2("Returns the maximum of all elements of a set of numbers.", 512 "Devuelve la máximo de todos los elementos de un conjunto de números."), 466 513 BOperClassify::Statistic_); 467 514 void BDatSetMax::CalcContens() … … 496 543 DefExtOpr(1, BDatSetAvr, "SetAvr", 1, 1, "Set", 497 544 I2("(Set set)","(Set cto)"), 498 I2("Returns the arithmetic average of all elements of a set .",499 "Devuelve la media aritmética de todos los elementos de un conjunto ."),545 I2("Returns the arithmetic average of all elements of a set of numbers.", 546 "Devuelve la media aritmética de todos los elementos de un conjunto de números."), 500 547 BOperClassify::Statistic_); 501 548 void BDatSetAvr::CalcContens() … … 530 577 DefExtOpr(1, BDatSetHarmonicAvr, "SetHarmonicAvr", 1, 1, "Set", 531 578 I2("(Set set)","(Set cto)"), 532 I2("Returns the harmonic average of all elements of a set .",533 "Devuelve la media armónica de todos los elementos de un conjunto ."),579 I2("Returns the harmonic average of all elements of a set of numbers.", 580 "Devuelve la media armónica de todos los elementos de un conjunto de números."), 534 581 BOperClassify::Statistic_); 535 582 void BDatSetHarmonicAvr::CalcContens() … … 564 611 DefExtOpr(1, BDatSetGeometricAvr, "SetGeometricAvr", 1, 1, "Set", 565 612 I2("(Set set)","(Set cto)"), 566 I2("Returns the geometric average of all elements of a set .",567 "Devuelve la media geométrica de todos los elementos de un conjunto ."),613 I2("Returns the geometric average of all elements of a set of numbers.", 614 "Devuelve la media geométrica de todos los elementos de un conjunto de números."), 568 615 BOperClassify::Statistic_); 569 616 void BDatSetGeometricAvr::CalcContens() … … 598 645 DefExtOpr(1, BDatSetQuantile, "SetQuantile", 2, 2, "Set Real", 599 646 I2("(Set set, Real p)","(Set cto, Real p)"), 600 I2("Returns the quantile of probability p of all elements of a set .",647 I2("Returns the quantile of probability p of all elements of a set of numbers.", 601 648 "Devuelve el cuantil de probabilidad p de todos los elementos " 602 "de un conjunto ."),649 "de un conjunto de números."), 603 650 BOperClassify::Statistic_); 604 651 void BDatSetQuantile::CalcContens() … … 636 683 DefExtOpr(1, BDatSetStDs, "SetStDs", 1, 1, "Set", 637 684 I2("(Set set)","(Set cto)"), 638 I2("Returns the standard deviation of all elements of a set .",685 I2("Returns the standard deviation of all elements of a set of numbers.", 639 686 "Devuelve la desviación típica de todos los elementos de un " 640 687 "conjunto."), … … 671 718 DefExtOpr(1, BDatSetVar, "SetVar", 1, 1, "Set", 672 719 I2("(Set set)","(Set cto)"), 673 I2("Returns the varianze of all elements of a set .",674 "Devuelve la varianza de todos los elementos de un conjunto ."),720 I2("Returns the varianze of all elements of a set of numbers.", 721 "Devuelve la varianza de todos los elementos de un conjunto de números."), 675 722 BOperClassify::Statistic_); 676 723 void BDatSetVar::CalcContens() … … 700 747 } 701 748 749 //-------------------------------------------------------------------- 750 DeclareContensClass(BDat, BDatTemporary, BDatMatMoment); 751 DefExtOpr(1, BDatMatMoment, "MatMoment", 2, 2, "Matrix Real", 752 "(Matrix mat, Real n)", 753 I2("Returns the n-th moment of all cells of a matrix.", 754 "Devuelve el momento de orden n de todas las celdas de una " 755 "matriz."), 756 BOperClassify::Statistic_); 757 void BDatMatMoment::CalcContens() 758 //-------------------------------------------------------------------- 759 { 760 BMat& mat = Mat(Arg(1)); 761 BInt m = (BInt)Real(Arg(2)); 762 const BArray<BDat>& vec = mat.Data(); 763 contens_ = Moment(vec,m); 764 } 765 766 //-------------------------------------------------------------------- 767 DeclareContensClass(BDat, BDatTemporary, BDatMatCenterMoment); 768 DefExtOpr(1, BDatMatCenterMoment, "MatCenterMoment", 2, 2, "Matrix Real", 769 "(Matrix mat, Real n)", 770 I2("Returns the n-th centered moment of all cells of a matrix.", 771 "Devuelve el momento centrado de orden n de todas las celdas de una " 772 "matriz."), 773 BOperClassify::Statistic_); 774 void BDatMatCenterMoment::CalcContens() 775 //-------------------------------------------------------------------- 776 { 777 BMat& mat = Mat(Arg(1)); 778 BInt m = (BInt)Real(Arg(2)); 779 const BArray<BDat>& vec = mat.Data(); 780 contens_ = CenterMoment(vec,m); 781 } 782 783 /* 784 //-------------------------------------------------------------------- 785 DeclareContensClass(BDat, BDatTemporary, BDatSetMoment); 786 DefExtOpr(1, BDatSetMoment, "MatMoment", 2, 2, "Set Real", 787 I2("(Set set, Real n)","(Set cto, Real n)"), 788 I2("Returns the n-th moment of all elements of a set of numbers.", 789 "Devuelve el momento de orden n de todos los elementos de un " 790 "conjunto."), 791 BOperClassify::Statistic_); 792 void BDatSetMoment::CalcContens() 793 //-------------------------------------------------------------------- 794 { 795 BSet& set = Set (Arg(1)); 796 if(!CheckRealElement("SetMoment",set)) { return; } 797 BInt m = (BInt)Real(Arg(2)); 798 BArray<BDat> vec(set.Card()); 799 for(BInt n=0; n<vec.Size(); n++) { vec[n] = Dat(set[n+1]); } 800 contens_ = Moment(vec,m); 801 } 802 803 804 //-------------------------------------------------------------------- 805 DeclareContensClass(BDat, BDatTemporary, BDatSetCenterMoment); 806 DefExtOpr(1, BDatSetCenterMoment, "SetCenterMoment", 2, 2, "Set Real", 807 I2("(Set set, Real n)","(Set cto, Real n)"), 808 I2("Returns the n-th centered moment of all elements of a set of numbers.", 809 "Devuelve el momento centrado de orden n de todos los elementos de un " 810 "conjunto."), 811 BOperClassify::Statistic_); 812 void BDatSetCenterMoment::CalcContens() 813 //-------------------------------------------------------------------- 814 { 815 BSet& set = Set (Arg(1)); 816 if(!CheckRealElement("SetCenterMoment",set)) { return; } 817 BInt m = (BInt)Real(Arg(2)); 818 BArray<BDat> vec(set.Card()); 819 for(BInt n=0; n<vec.Size(); n++) { vec[n] = Dat(set[n+1]); } 820 contens_ = CenterMoment(vec,m); 821 } 822 */ 702 823 703 824 //-------------------------------------------------------------------- … … 705 826 DefExtOpr(1, BDatSetKurtosis, "SetKurtosis", 1, 1, "Set", 706 827 I2("(Set set)","(Set cto)"), 707 I2("Returns the kurtosis of all elements of a set .",708 "Devuelve la curtosis de todos los elementos de un conjunto ."),828 I2("Returns the kurtosis of all elements of a set of numbers.", 829 "Devuelve la curtosis de todos los elementos de un conjunto de números."), 709 830 BOperClassify::Statistic_); 710 831 void BDatSetKurtosis::CalcContens() … … 739 860 DefExtOpr(1, BDatSetAsymmetry, "SetAsymmetry", 1, 1, "Set", 740 861 I2("(Set set)","(Set cto)"), 741 I2("Returns the asymmetry coefficient of all elements of a set .",862 I2("Returns the asymmetry coefficient of all elements of a set of numbers.", 742 863 "Devuelve el coeficiente de asimetría de todos los elementos de un " 743 864 "conjunto."), … … 775 896 DefExtOpr(1, BDatSetMoment, "SetMoment", 2, 2, "Set Real", 776 897 I2("(Set set, Real n)","(Set cto, Real n)"), 777 I2("Returns the n-th moment of all elements of a set .",898 I2("Returns the n-th moment of all elements of a set of numbers.", 778 899 "Devuelve el momento de orden n de todos los elementos de un " 779 900 "conjunto."), … … 795 916 DefExtOpr(1, BDatSetCenterMoment, "SetCenterMoment", 2, 2, "Set Real", 796 917 I2("(Set set, Real n)","(Set cto, Real n)"), 797 I2("Returns the n-th centered moment of all elements of a set .",918 I2("Returns the n-th centered moment of all elements of a set of numbers.", 798 919 "Devuelve el momento centrado de orden n de todos los elementos de un " 799 920 "conjunto."), -
tol/btol/real_type/datgsrst.cpp
rb6c14f4 r09bb52b 165 165 166 166 //-------------------------------------------------------------------- 167 DefExtOpr(1, BDatStatKnown, "KnownS", 1, 3, "Serie Date Date", 168 I2("(Serie ser [, Date from, Date until])", 169 "(Serie ser [, Date desde, Date hasta])"), 170 I2("Returns the number of non missing data of a serie between two dates. " 171 "If they do not appear, it is assumed the calculation with the " 172 "first and last dates of the series. Finally, if the series lacks " 173 "dates, is calculated with the dates by defect. ", 174 "Devuelve el número de datos no omitidos de una serie entre dos fechas. " 175 "Si no aparecen, se asume el cálculo con las fechas primera " 176 "y última de la serie. Por último, si la serie carece de fechas, " 177 "se calcula con las fechas por defecto."), 178 BOperClassify::Statistic_); 179 void BDatStatKnown::CalcContens() 180 //-------------------------------------------------------------------- 181 { 182 if(ser_ && TsrR(ser_).Dating()) 183 { 184 if(TsrR(ser_).FirstDate()>TsrR(ser_).LastDate()) 185 { 186 contens_ = 0; 187 } 188 else 189 { 190 contens_ = Known(vec_); //1 + TsrR(ser_).Dating()->Difference(ini_, fin_); 191 } 192 } 193 } 194 195 //-------------------------------------------------------------------- 167 196 DefExtOpr(1, BDatStatMax, "MaxS", 1, 3, "Serie Date Date", 168 197 I2("(Serie ser [, Date from, Date until])", … … 233 262 234 263 //-------------------------------------------------------------------- 264 DefExtOpr(1, BDatStatProd, "ProdS", 1, 3, "Serie Date Date", 265 I2("(Serie ser [, Date from, Date until])", 266 "(Serie ser [, Date desde, Date hasta])"), 267 I2("Returns the product of a serie between two dates. " 268 "If they do not appear, it is assumed the calculation with the " 269 "first and last dates of the series. Finally, if the series lacks " 270 "dates, is calculated with the dates by defect.", 271 "Devuelve el producto de una serie entre dos fechas. " 272 "Si no aparecen, se asume el cálculo con las fechas primera " 273 "y última de la serie. Por último, si la serie carece de fechas, " 274 "se calcula con las fechas por defecto."), 275 BOperClassify::Statistic_); 276 void BDatStatProd::CalcContens() 277 //-------------------------------------------------------------------- 278 { 279 if(ser_ && TsrR(ser_).Dating()) 280 { 281 contens_ = Product(vec_); 282 } 283 } 284 285 //-------------------------------------------------------------------- 235 286 DefExtOpr(1, BDatStatAverage, "AvrS", 1, 3, "Serie Date Date", 236 287 I2("(Serie ser [, Date from, Date until])", … … 253 304 } 254 305 } 306 307 308 //-------------------------------------------------------------------- 309 DefExtOpr(1, BDatStatGeometricAverage, "GeometricAvrS", 1, 3, "Serie Date Date", 310 I2("(Serie ser [, Date from, Date until])", 311 "(Serie ser [, Date desde, Date hasta])"), 312 I2("Returns the geometric average of a serie between two dates. " 313 "If they do not appear, it is assumed the calculation with the " 314 "first and last dates of the series. Finally, if the series lacks " 315 "dates, is calculated with the dates by defect.", 316 "Devuelve la media geométrica de una serie entre dos fechas. " 317 "Si no aparecen, se asume el cálculo con las fechas primera " 318 "y última de la serie. Por último, si la serie carece de fechas, " 319 "se calcula con las fechas por defecto."), 320 BOperClassify::Statistic_); 321 void BDatStatGeometricAverage::CalcContens() 322 //-------------------------------------------------------------------- 323 { 324 if(ser_ && TsrR(ser_).Dating()) 325 { 326 contens_ = GeometricAverage(vec_); 327 } 328 } 329 330 331 //-------------------------------------------------------------------- 332 DefExtOpr(1, BDatStatHarmonicAverage, "HarmonicAvrS", 1, 3, "Serie Date Date", 333 I2("(Serie ser [, Date from, Date until])", 334 "(Serie ser [, Date desde, Date hasta])"), 335 I2("Returns the harmonic average of a serie between two dates. " 336 "If they do not appear, it is assumed the calculation with the " 337 "first and last dates of the series. Finally, if the series lacks " 338 "dates, is calculated with the dates by defect.", 339 "Devuelve la media armónica de una serie entre dos fechas. " 340 "Si no aparecen, se asume el cálculo con las fechas primera " 341 "y última de la serie. Por último, si la serie carece de fechas, " 342 "se calcula con las fechas por defecto."), 343 BOperClassify::Statistic_); 344 void BDatStatHarmonicAverage::CalcContens() 345 //-------------------------------------------------------------------- 346 { 347 if(ser_ && TsrR(ser_).Dating()) 348 { 349 contens_ = HarmonicAverage(vec_); 350 } 351 } 352 255 353 256 354 … … 374 472 } 375 473 376 377 //-------------------------------------------------------------------- 378 DefExtOpr(1, BDatStatAsimetry, "AsimetryS", 1, 3, "Serie Date Date",379 I2("(Serie ser [, Date from, Date until])",380 "(Serie ser [, Date desde, Date hasta])"), 474 static BText _asymmetry_types = "Serie Date Date"; 475 static BText _asymmetry_args = 476 I2("(Serie ser [, Date from, Date until])", 477 "(Serie ser [, Date desde, Date hasta])"); 478 static BText _asymmetry_desc = 381 479 I2("Returns the asymmetry coefficient of a serie between two dates. " 382 480 "If they do not appear, it is assumed the calculation with the " … … 386 484 "Si no aparecen, se asume el cálculo con las fechas primera " 387 485 "y última de la serie. Por último, si la serie carece de fechas, " 388 "se calcula con las fechas por defecto."), 389 BOperClassify::Statistic_); 390 void BDatStatAsimetry::CalcContens() 486 "se calcula con las fechas por defecto."); 487 488 //-------------------------------------------------------------------- 489 DefExtOpr(1, BDatStatAsymmetry, "AsymmetryS", 1, 3, 490 _asymmetry_types,_asymmetry_args,_asymmetry_desc, 491 BOperClassify::Statistic_); 492 DefExtOpr(2, BDatStatAsymmetry, "AsimetryS", 1, 3, 493 _asymmetry_types,_asymmetry_args,_asymmetry_desc + "\n"+ 494 I2("DEPRECATED! Please, use AymmetryS", 495 "OBSOLETO! Por favor, use AymmetryS"), 496 BOperClassify::Statistic_); 497 void BDatStatAsymmetry::CalcContens() 391 498 //-------------------------------------------------------------------- 392 499 { … … 448 555 I2("(Serie ser, Date from, Date until, Real p)", 449 556 "(Serie ser, Date desde, Date hasta, Real p)"), 450 I2("Returns the quantile of a given probability of a serie between two "557 I2("Returns the quantile of a given probability p of a serie between two " 451 558 "dates. ", 452 559 "Devuelve el cuantil de probabilidad p de una serie entre dos " … … 525 632 { return(BDatStatVarianze (NCons(ser)).Contens()); } 526 633 527 BDat StatAs imetry(BSyntaxObject* ser)528 { return(BDatStatAs imetry (NCons(ser)).Contens()); }634 BDat StatAsymmetry(BSyntaxObject* ser) 635 { return(BDatStatAsymmetry (NCons(ser)).Contens()); } 529 636 530 637 BDat StatKurtosis(BSyntaxObject* ser) -
tol/btol/real_type/tol_bdatgra.h
rb6c14f4 r09bb52b 109 109 DeclareStatisticClass(BDatStatLast); 110 110 DeclareStatisticClass(BDatStatCount); 111 DeclareStatisticClass(BDatStatKnown); 111 112 DeclareStatisticClass(BDatStatMax); 112 113 DeclareStatisticClass(BDatStatMin); … … 114 115 DeclareStatisticClass(BDatStatQuantile); 115 116 DeclareStatisticClass(BDatStatSum); 117 DeclareStatisticClass(BDatStatProd); 116 118 DeclareStatisticClass(BDatStatAverage); 119 DeclareStatisticClass(BDatStatGeometricAverage); 120 DeclareStatisticClass(BDatStatHarmonicAverage); 117 121 DeclareStatisticClass(BDatStatVarianze); 118 122 DeclareStatisticClass(BDatStatStDs); … … 120 124 DeclareStatisticClass(BDatStatSubSampleVarianze); 121 125 DeclareStatisticClass(BDatStatSubSampleStDs); 122 DeclareStatisticClass(BDatStatAs imetry);126 DeclareStatisticClass(BDatStatAsymmetry); 123 127 DeclareStatisticClass(BDatStatKurtosis); 124 128 DeclareStatisticClass(BDatStatMoment); … … 168 172 DeclareCStatisticClass(BDatCStatSubSampleVarianze); 169 173 DeclareCStatisticClass(BDatCStatSubSampleStDs); 170 DeclareCStatisticClass(BDatCStatAs imetry);174 DeclareCStatisticClass(BDatCStatAsymmetry); 171 175 DeclareCStatisticClass(BDatCStatKurtosis); 172 176 DeclareCStatisticClass(BDatCStatMoment); … … 189 193 TOL_API BDat StatStDs (BSyntaxObject* ser); 190 194 TOL_API BDat StatVarianze (BSyntaxObject* ser); 191 TOL_API BDat StatAs imetry (BSyntaxObject* ser);195 TOL_API BDat StatAsymmetry (BSyntaxObject* ser); 192 196 TOL_API BDat StatKurtosis (BSyntaxObject* ser); 193 197 TOL_API BDat StatMedian (BSyntaxObject* ser); … … 206 210 TOL_API BDat CStatStDs (BSyntaxObject* cser); 207 211 TOL_API BDat CStatVarianze (BSyntaxObject* cser); 208 TOL_API BDat CStatAs imetry (BSyntaxObject* cser);212 TOL_API BDat CStatAsymmetry (BSyntaxObject* cser); 209 213 TOL_API BDat CStatKurtosis (BSyntaxObject* cser); 210 214 TOL_API BDat CStatMedian (BSyntaxObject* cser); -
tol/btol/vmatrix_type/vmatgra.cpp
rb6c14f4 r09bb52b 39 39 #include <tol/tol_blanguag.h> 40 40 #include <tol/tol_bvmat_bsr.h> 41 #include <tol/tol_bstat.h> 41 42 #include <tol/tol_bdir.h> 42 43 … … 2344 2345 2345 2346 //-------------------------------------------------------------------- 2347 DeclareContensClass(BDat, BDatTemporary, BDatVMatCount); 2348 DefExtOpr(1, BDatVMatCount, "VMatCount", 1, 1, "VMatrix", 2349 "(VMatrix mat)", 2350 I2("Returns the number of cells of a matrix (rows x columns).", 2351 "Devuelve el número de celdas de una matriz (filas x columnas)."), 2352 BOperClassify::Statistic_); 2353 void BDatVMatCount::CalcContens() 2354 //-------------------------------------------------------------------- 2355 { 2356 BVMat& x = VMat(Arg(1)); 2357 contens_ = x.Rows() * x.Columns(); 2358 } 2359 2360 //-------------------------------------------------------------------- 2361 DeclareContensClass(BDat, BDatTemporary, BDatVMatKnown); 2362 DefExtOpr(1, BDatVMatKnown, "VMatKnown", 1, 1, "VMatrix", 2363 "(VMatrix mat)", 2364 I2("Returns the number of cells of a matrix (rows x columns).", 2365 "Devuelve el número de celdas de una matriz (filas x columnas)."), 2366 BOperClassify::Statistic_); 2367 void BDatVMatKnown::CalcContens() 2368 //-------------------------------------------------------------------- 2369 { 2370 BVMat& x = VMat(Arg(1)); 2371 BMat y; 2372 x.GetDMatT(*((DMat*)&y)); 2373 contens_ = Known(y.Data()); 2374 } 2375 2376 //-------------------------------------------------------------------- 2346 2377 DeclareContensClass(BDat, BDatTemporary, BDatVMatSum); 2347 2378 DefExtOpr(1, BDatVMatSum, "VMatSum", 1, 1, "VMatrix", … … 2357 2388 2358 2389 //-------------------------------------------------------------------- 2390 DeclareContensClass(BDat, BDatTemporary, BDatVMatProduct); 2391 DefExtOpr(1, BDatVMatProduct, "VMatProduct", 1, 1, "VMatrix", 2392 "(VMatrix mat)", 2393 I2("Returns the product of all elements of a matrix.", 2394 "Devuelve el producto de todos los elementos de una matriz."), 2395 BOperClassify::Statistic_); 2396 void BDatVMatProduct::CalcContens() 2397 //-------------------------------------------------------------------- 2398 { 2399 BVMat& x = VMat(Arg(1)); 2400 BMat y; 2401 x.GetDMatT(*((DMat*)&y)); 2402 contens_ = Product(y.Data()); 2403 } 2404 2405 //-------------------------------------------------------------------- 2359 2406 DeclareContensClass(BDat, BDatTemporary, BDatVMatAvr); 2360 2407 DefExtOpr(1, BDatVMatAvr, "VMatAvr", 1, 1, "VMatrix", … … 2370 2417 2371 2418 //-------------------------------------------------------------------- 2419 DeclareContensClass(BDat, BDatTemporary, BDatVMatGeometricAvr); 2420 DefExtOpr(1, BDatVMatGeometricAvr, "VMatGeometricAvr", 1, 1, "VMatrix", 2421 "(VMatrix mat)", 2422 I2("Returns the geometric average of all elements of a matrix.", 2423 "Devuelve la media geométrica de todos los elementos de una matriz."), 2424 BOperClassify::Statistic_); 2425 void BDatVMatGeometricAvr::CalcContens() 2426 //-------------------------------------------------------------------- 2427 { 2428 BVMat& x = VMat(Arg(1)); 2429 BMat y; 2430 x.GetDMatT(*((DMat*)&y)); 2431 contens_ = GeometricAverage(y.Data()); 2432 } 2433 2434 //-------------------------------------------------------------------- 2435 DeclareContensClass(BDat, BDatTemporary, BDatVMatHarmonicAvr); 2436 DefExtOpr(1, BDatVMatHarmonicAvr, "VMatHarmonicAvr", 1, 1, "VMatrix", 2437 "(VMatrix mat)", 2438 I2("Returns the harmonic average of all elements of a matrix.", 2439 "Devuelve la media armónica de todos los elementos de una matriz."), 2440 BOperClassify::Statistic_); 2441 void BDatVMatHarmonicAvr::CalcContens() 2442 //-------------------------------------------------------------------- 2443 { 2444 BVMat& x = VMat(Arg(1)); 2445 BMat y; 2446 x.GetDMatT(*((DMat*)&y)); 2447 contens_ = GeometricAverage(y.Data()); 2448 } 2449 2450 2451 //-------------------------------------------------------------------- 2372 2452 DeclareContensClass(BDat, BDatTemporary, BDatVMatVar); 2373 2453 DefExtOpr(1, BDatVMatVar, "VMatVar", 1, 1, "VMatrix", … … 2420 2500 contens_ = VMat(Arg(1)).Kurtosis(); 2421 2501 } 2502 2503 //-------------------------------------------------------------------- 2504 DeclareContensClass(BDat, BDatTemporary, BDatVMatMedian); 2505 DefExtOpr(1, BDatVMatMedian, "VMatMedian", 1, 1, "VMatrix", 2506 "(VMatrix mat)", 2507 I2("Returns the median of all elements of a matrix.", 2508 "Devuelve la mediana de todos los elementos de una matriz."), 2509 BOperClassify::Statistic_); 2510 void BDatVMatMedian::CalcContens() 2511 //-------------------------------------------------------------------- 2512 { 2513 BVMat& x = VMat(Arg(1)); 2514 BMat y; 2515 x.GetDMatT(*((DMat*)&y)); 2516 contens_ = Median(y.Data()); 2517 } 2518 2519 //-------------------------------------------------------------------- 2520 DeclareContensClass(BDat, BDatTemporary, BDatVMatQunatile); 2521 DefExtOpr(1, BDatVMatQunatile, "VMatQuantile", 2, 2, "VMatrix Real", 2522 "(VMatrix mat, Real p)", 2523 I2("Returns the the quantile of a given probability p of all elements of a matrix.", 2524 "Devuelve el cuantil de probabilidad p de todos los elementos de una matriz."), 2525 BOperClassify::Statistic_); 2526 void BDatVMatQunatile::CalcContens() 2527 //-------------------------------------------------------------------- 2528 { 2529 BVMat& x = VMat(Arg(1)); 2530 BDat p = Dat(Arg(2)); 2531 BMat y; 2532 x.GetDMatT(*((DMat*)&y)); 2533 contens_ = Quantile(y.Data(),p); 2534 } 2535 2422 2536 2423 2537 //-------------------------------------------------------------------- -
tol/lang/language.cpp
rb6c14f4 r09bb52b 768 768 if(header=="_DEFAULT_HEADER_") 769 769 { 770 table[i++][0] = I2("Statistic ", "Estad ᅵstico");770 table[i++][0] = I2("Statistic ", "EstadÃstico"); 771 771 table[i++][0] = I2("Count ", "Longitud "); 772 table[i++][0] = I2("Maximum ", "M ᅵximo ");773 table[i++][0] = I2("Minimum ", "M ᅵnimo ");772 table[i++][0] = I2("Maximum ", "Máximo "); 773 table[i++][0] = I2("Minimum ", "MÃnimo "); 774 774 table[i++][0] = I2("Sum ", "Suma "); 775 775 table[i++][0] = I2("Average ", "Media "); 776 776 table[i++][0] = I2("Std. Desv. ", "Desv. Tip. "); 777 777 table[i++][0] = I2("Varianze ", "Varianza "); 778 table[i++][0] = I2("Asymmetry ", "Asimetrᅵa ");778 table[i++][0] = I2("Asymmetry ", "AsimetrÃa "); 779 779 table[i++][0] = I2("Kurtosis ", "Curtosis "); 780 780 table[i++][0] = I2("Median ", "Mediana "); … … 798 798 i=0; 799 799 table[i++][j] = ser->Identify(); 800 table[i++][j] = StatCount (ser).Name();801 table[i++][j] = StatMax (ser).Name();802 table[i++][j] = StatMin (ser).Name();803 table[i++][j] = StatSum (ser).Name();804 table[i++][j] = StatAverage (ser).Name();805 table[i++][j] = StatStDs (ser).Name();806 table[i++][j] = StatVarianze (ser).Name();807 table[i++][j] = StatAs imetry(ser).Name();808 table[i++][j] = StatKurtosis (ser).Name();809 table[i++][j] = StatMedian (ser).Name();800 table[i++][j] = StatCount (ser).Name(); 801 table[i++][j] = StatMax (ser).Name(); 802 table[i++][j] = StatMin (ser).Name(); 803 table[i++][j] = StatSum (ser).Name(); 804 table[i++][j] = StatAverage (ser).Name(); 805 table[i++][j] = StatStDs (ser).Name(); 806 table[i++][j] = StatVarianze (ser).Name(); 807 table[i++][j] = StatAsymmetry(ser).Name(); 808 table[i++][j] = StatKurtosis (ser).Name(); 809 table[i++][j] = StatMedian (ser).Name(); 810 810 } 811 811 lst = Cdr(lst);
Note: See TracChangeset
for help on using the changeset viewer.
