Re: [sc-dev] DEV300m84 hangs when saving from Calc
Hi David, David Tardon schrieb: On Mon, Aug 09, 2010 at 10:20:11AM +0200, Daniel Rentz wrote: Hi Regina, Am 08.08.2010 19:12, schrieb Regina Henschel: I have build DEV300m84 on WinXP. That works so far, but saving a spreadsheet document from Calc gives always the Debug Output: Error: wrong NameAccess From File C:/DEV300m84my/xmloff/source/core/SettingsExportHelper.cxx at Line 406 If I ignore it, the file is saved, but OOo does not react on mouse or key. I have to kill it with task manager. Is this a special problem of my build? Is there something to avoid the problem? It is very annoying when testing my changes. I'll have a look. Hi, see http://qa.openoffice.org/issues/show_bug.cgi?id=113737 for the assertion. I have applied the patch. Now I get no longer a Debug Output, but OOo still hangs after saving. Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
[sc-dev] Trouble with ScInterpreter::MFastMult
Hi all, in interpr5.cxx you find void ScInterpreter::MFastMult(ScMatrix* pA, ScMatrix* pB, ScMatrix* pR, SCSIZE n, SCSIZE m, SCSIZE l) // Multipliziert n x m Mat a mit m x l Mat b nach Mat r But actually it calculates R = B * A and A has size m x n and B has size l x m. I need a helper method for multiplying two matrices, so I used it as the comment describes. It took me some time to recognize that this method was the reason for the dimension errors I get. Searching with OpenGrok I find no place, where the method MFastMult is actually used. As far as I see it had been used in the old version of LUP decomposition which was changed with CWS dr37. So what to do? (1) Change the method to work as the comment describes. or (2) Change the comment to describe, what the method actually does. or (3) Delete the method totally and write my own local routine. or (4) Ignore the method and write my own local routine. or something else? I prefer (1). Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] OpenOffice 3.2 Calc adding bitmap image to a cell
Hi Jari, this is the wrong list for your questions. Macros belong to the udk or the api project and images belong to the graphics project. Kind regards Regina Jari Kosonen schrieb: Can you advice how to change the pivot point in the calc -macro? oLinked.RotateAngle=rot oLinked.Position=aPos oLinked.Pivot=aPos ?? Does not work, since I don't know the internal structure's name... oLinked.Size=aSize oLinked.Name=sDie oDrawPage.add(oLinked) -- Jari - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] Changing values in matrix which is parameter
Hi Eike, Eike Rathke schrieb: Hi Regina, On Sunday, 2010-08-08 20:38:21 +0200, Regina Henschel wrote: in method LINEST I get pMatX from the stack. That is a reference to the matrix MatX. I calculate the means column wise getting a matrix MeanX with associated reference pMeanX. In next step I calculate pMatX-GetDouble(i,j) - pMeanX-GetDouble(i,0) Can I overwrite the values in matrix MatX with this results? Or must the values of the matrix MatX remain unchanged by the method LINEST? Use a new matrix created with ScInterpreter::GetNewMat(), a matrix argument may be a matrix constant as in LINEST(...;{1|2|3|4};...) I have not considered that in my tests, fortunately I ask here. When X and Y are the given matrices and deltaX and deltaY those matrices where the means are subtracted, then the needed calculation for the coefficients B (in column arrangement) is in case of with constant B = (deltaX' * deltaX)^{-1} * deltaX' * deltaY and in case of without constant B = (X' * X)^{-1} * X' * Y where A' means transpose(A) and A^{-1} means inverse(A). So using deltaX instead of X would have been handy. The current implementation avoids to copy the matrices X or Y, although that would ease and shorten the code. I thought there must be a reason for that and tried to avoid it too. I hesitate to copy X or Y, because they might have a huge number of lines. Statistical investigations with more then 1000 samples are commonly. The number of variables (=columns of X) is often 1 or at least under 10. So products as X'X are much smaller. I will try only using new matrices for products like X'X as it is done in the current implementation. That will result in a lot of nearly identical multiplication methods, but I think, that is better than copying the matrices. Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] Changing values in matrix which is parameter
Hi Eike, Eike Rathke schrieb: Hi Regina, On Thursday, 2010-08-12 16:38:33 +0200, Regina Henschel wrote: The current implementation avoids to copy the matrices X or Y, although that would ease and shorten the code. I thought there must be a reason for that and tried to avoid it too. I hesitate to copy X or Y, because they might have a huge number of lines. Indeed. I will try only using new matrices for products like X'X as it is done in the current implementation. That will result in a lot of nearly identical multiplication methods, but I think, that is better than copying the matrices. To avoid both, having overly complicated code and copying large matrices, we could introduce a const/non-const flag in ScMatrix, defaulted to const and set to non-const by GetNewMat(), but to const again when stored in ScFormulaResult. The usual case is that a matrix was constructed from a range reference by the interpreter and not as a const array or formula cell result. Then having a ScMatrix::CloneIfConst() method could just return the current matrix if non-const and would have to actually clone only in rare const cases. Just an idea.. The problem with constant parameters is already actual :( http://www.openoffice.org/issues/show_bug.cgi?id=113879 Enter the formula =LOGEST({2|3|5|8|13};{2|4|6|8|10}) Set the cursor into the formula range to see the formula in the input line. Recalculate some times. Notice, that the values in the first parameter changes. This is done in the method ScInterpreter::CheckMatrix in the statement if ( _bLOG ) { for (SCSIZE nElem = 0; nElem nCountY; nElem++) { const double fVal = pMatY-GetDouble(nElem); if (fVal = 0.0) { PushIllegalArgument(); return false; } else pMatY-PutDouble(log(fVal), nElem); here } // for (nElem = 0; nElem nCountY; nElem++) } // if ( _bRKP ) Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
[sc-dev] Calc does not detect singularity
Hi all, next problem with matrices :( (All with German local with comma as decimal delimiter) Fill A1:C3 with 1 2 3 3 6 9 9,1 18 27 Calculate =MINVERSE(A1:C3) I get 0,-1.#NANE+000 #VALUE! #VALUE! #NUM! #NUM! #VALUE! #NUM! #NUM! #VALUE! I guess, that the wrong notation in upper, left cell is already tracked in issue 114125. But I think, Calc should not return #NUM! or #VALUE! at all, but Err:502 (illegal argument), because the matrix is singular. The LU decomposition has a zero in the diagonal, so it is possible to detect this case. Excel and Gnumeric return #NUM! in the whole range. Fill A1:D4 with 1 2 3 4 3 6 9 12 9 18,127 36 12,124 36 48 Calculate =MINVERSE(A1:D4) I get in full science notation -6,809917355371900E+001 -1,652892561983470E+001 0,000E+000 1,000E+001 -5,150539867109620E+001 -1,293916112956810E+001 9,860E+000 -5,177106436424810E-014 1,926351720312250E+015 -6,421172401040780E+014 1,670843776116550E-002 -1,408521303258110E+000 -1,444763790234140E+015 4,815879300780690E+014 -5,012531328320800E+000 -1,443609022556390E+000 which is in two decimal place notation -68,10 -16,53 0,0010,00 -51,51 -12,94 10,00 0,00 1926351720312250,00 -642117240104078,00 0,02-1,41 -1444763790234140,00481587930078069,00 -5,01 -1,44 If the user sees this result, he will be cautious. But it might be hidden as intermediate part of a larger formula. So the user does not notice that the result is totally wrong. LINEST needs calculating an inverse matrix for the statistics, but does of cause do not show the matrix but the statistics, so that the user might not detect, that the values are wrong. Gnumeric returns #ZAHL! errors and Excel returns the same wrong values as Calc. Should I test the intermediate results in LINEST to catch this cases and return an error? kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
[sc-dev] Shortcomings in ScInterpreter::CheckMatrix
Hi all, CheckMatrix is used for LINEST/LOGEST and for TREND/GROWTH. It checks whether the input matrices have correct size and content, generates the default matrix for an empty MatX, changes Y to log(Y) in case LOGEST and GROWTH, determines the size of the input matrices for output parameter nCX, nCY, nRX, nRY, the number of variables for output parameter M, and the number of observations for output parameter N. But this is not done consistent. In case of simple regression (nCase==1) the values M and N are not set correctly, but the initial value 0 is returned. In case of an emtpy MatX the values for nCX and nRX are only set in case of TREND/GROWTH. Currently this gives no error, because the loops do not run over N, M, nCX, or nRX but over nCY and nRY and the value for N is determined in that loops again. I struggle about this, because I want to use N and M in my solution for LINEST, to test, whether there are enough observations at all. I want to change CheckMatrix, so that N, M, nCX, nRX are set correctly in all cases. The parameter 'BOOL _bTrendGrowth' is then no longer needed and can be removed (otherwise it will produce a compiler warning). Do you agree with those changes? Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] Changing values in matrix which is parameter
Hi Eike, Eike Rathke schrieb: Hi Regina, On Monday, 2010-08-16 16:24:23 +0200, Eike Rathke wrote: The problem with constant parameters is already actual :( http://www.openoffice.org/issues/show_bug.cgi?id=113879 Thanks for catching. I'll see if I can easily introduce the mentioned CloneIfConst() approach or have to simply fix this with an unconditional Clone(). You may want to use the changeset fa8436bc0f37 in your further development, that implements the CloneIfConst() approach I mentioned. http://hg.services.openoffice.org/cws/calc58/changeset/fa8436bc0f37 I have applied it to my work now and it works fine :) But I need ScMatrixRef pNewY = pMatY-CloneIfConst(); not only in case _bLOG, so I had to move it to outside the if-statement. kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
[sc-dev] TREND/GROWTH in ODF
Hi all, in the current implementation some functions are common to TREND/GROWTH and LINEST/LOGEST. So working on LINEST I had a look at TREND too. And I have found some problems. The definition of TREND in ODF1.2 (6.18.79) allows only NumberSequence as parameters and constrains the column, row and overall count of knownY to be equal to knownX. So that definition does not cover multiple linear regression but only simple linear regression. On the outher hand, because of the rules for conversion to NumberSequence (6.3.7), also cells without numbers may be includes in the ranges and will not be considered for the NumberSequence. GNUMERIC calculates as described in ODF: Only simple linear regression, but allow text cells in the range. EXCEL calculates as Calc: Allow multiple regression, but disallow text cells. So what to do? Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] TREND/GROWTH in ODF
Hi all, it seems the problem is solved in the way, that ODF will be changed. See http://lists.oasis-open.org/archives/office/201009/msg00356.html and http://tools.oasis-open.org/issues/browse/OFFICE-3437 Kind regards Regina Regina Henschel schrieb: Hi all, in the current implementation some functions are common to TREND/GROWTH and LINEST/LOGEST. So working on LINEST I had a look at TREND too. And I have found some problems. The definition of TREND in ODF1.2 (6.18.79) allows only NumberSequence as parameters and constrains the column, row and overall count of knownY to be equal to knownX. So that definition does not cover multiple linear regression but only simple linear regression. On the outher hand, because of the rules for conversion to NumberSequence (6.3.7), also cells without numbers may be includes in the ranges and will not be considered for the NumberSequence. GNUMERIC calculates as described in ODF: Only simple linear regression, but allow text cells in the range. EXCEL calculates as Calc: Allow multiple regression, but disallow text cells. So what to do? Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
Re: [sc-dev] Calc does not detect singularity
Hi Eike, Eike Rathke schrieb: Hi Regina, I'll try to give some long outstanding answers to questions you asked shortly before I went to OOoCon and then into vacation and then.. On Thursday, 2010-08-26 22:33:20 +0200, Regina Henschel wrote: next problem with matrices :( (All with German local with comma as decimal delimiter) Fill A1:C3 with 1 2 3 3 6 9 9,1 18 27 Calculate =MINVERSE(A1:C3) That looks related, though I don't know at the moment how that should occur in Calc. We usually convert all INF and NAN to errors. Which milestone did you use? I have know installed OOo3.3.0 RC1 on Windows7 and get NaN #VALUE! #VALUE! #NUM! #NUM! #VALUE! #NUM! #NUM! #VALUE! Shall I write an issue? Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
[sc-dev] Questions about LINEST implementation
Hi all, I have written issue http://www.openoffice.org/issues/show_bug.cgi?id=115189 for to attach the first draft of my implementation for LINEST. But there are still a lot of questions. So please have a look at that draft. (Checkmatrix has not essentially changed, but you need this version with correct n and m, if you will test my solution.) (A) The algorithm for nCase==2 and nCase==3 are nearly equal besides the fact, that the matrices of X and Y values are transposed. How should I handle this? (1) Write all functions in two variants? Then the functions are small and have only one purpose, but the code becomes very long. (2) Introduce a switch between both cases on every place needed. Then the code will become shorter, but the functions become more complex and during execution the very same case distinction is made a lot of times. (3) Transpose the matrices X and Y and then use only one case. That will give short and good maintainable code. But you need double place in memory. How large are those matrices in reality? Is double place in memory possible? (B) The functions TREND and GROWTH are calculated with the same mathematical solution. Shall I change them in the same way? Then the methods calculate2 and calculate3 would be obsolete. (C) Currently all helper functions are defined as local function and not as methods of ScInterpreter. Do you like to see any of this local functions to become a ScInterpreter method? In the actual implementation the helper functions are all ScInterpreter methods. Why? (D) What kind of boolean type shall I use? I have now used bool locally. But for example in void ScInterpreter::CalulateRGPRKP(BOOL _bRKP) a change to bool_bRKP would change the declaration. I would have to change it in interpr.hxx too. Does that harm? (E) Often it has to be tested, whether a matrix was created properly by calling GetNewMat or when pop from stack. Shall I use if(pMatrix) or if(pMatrix.Is())? Shall I use errStackOverflow, if GetNewMat does not create the matrix? (F) QR-decomposition with Householder transformation is a common mathematical method. But it might be necessary to explain the concrete implementation. Please have a look. Shall I omit such comments and attach a separate, commented version to the issue or even write a full text? (G) My implementation of LINEST uses X-MeansX and Y-MeanY instead of adding a column with 1 to the X values, which you will find in the description in the ODF spec. Does this need a separate documentation? Kind regards Regina - To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: dev-h...@sc.openoffice.org
[sc-dev] type logical in Excel
Hi, I just noticed, that Excel 2007 and Excel 2010 distinguish between type Logical and type Number. Is this new in Excel 2007/2010 or did Excel had a separate type Logical before? (I haven't got an older version of Excel and therefore cannot examine it by myself.) I came across it, when I looked at the Microsoft test files from http://lists.oasis-open.org/archives/office/201102/msg00032.html Kind regards Regina -- To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org For additional commands, e-mail: sy...@sc.openoffice.org with Subject: help
[sc-dev] Re: Internship 2010: Statistical Data Analysis Tool
Hi Niklas, hi Pivithuruw, Niklas Nebel schrieb: On 28.03.2011 10:50, Niklas Nebel wrote: It's in the download section of sc.openoffice.org, the URL is now http://openoffice.org/projects/sc/downloads/directory/Data%20Analysis. But apparently, some of the files were truncated in the Kenai transition. I'll try to get that fixed. I re-uploaded it. final evaluation version is the latest version. Niklas Thanks, I have found it. Installations works fine with DEV300m104. Kind regards Regina -- - To unsubscribe send email to dev-unsubscr...@sc.openoffice.org For additional commands send email to sy...@sc.openoffice.org with Subject: help