Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c79305f2
Kaydet (Commit)
c79305f2
authored
Tem 17, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
For sum product, the initial accumulator value should be 1, not 0.
Change-Id: I16ce22150627f75eab08cc4d58fc63a76572c010
üst
608fdfe1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
scmatrix.cxx
sc/source/core/tool/scmatrix.cxx
+9
-2
No files found.
sc/source/core/tool/scmatrix.cxx
Dosyayı görüntüle @
c79305f2
...
...
@@ -960,6 +960,8 @@ namespace {
struct
SumOp
{
static
const
double
initVal
=
0.0
;
void
operator
()
(
double
&
rAccum
,
double
fVal
)
{
rAccum
+=
fVal
;
...
...
@@ -968,6 +970,8 @@ struct SumOp
struct
SumSquareOp
{
static
const
double
initVal
=
0.0
;
void
operator
()
(
double
&
rAccum
,
double
fVal
)
{
rAccum
+=
fVal
*
fVal
;
...
...
@@ -976,6 +980,8 @@ struct SumSquareOp
struct
ProductOp
{
static
const
double
initVal
=
1.0
;
void
operator
()
(
double
&
rAccum
,
double
fVal
)
{
rAccum
*=
fVal
;
...
...
@@ -991,7 +997,7 @@ class WalkElementBlocks : std::unary_function<MatrixImplType::element_block_node
bool
mbFirst
:
1
;
bool
mbTextAsZero
:
1
;
public
:
WalkElementBlocks
(
bool
bTextAsZero
)
:
maRes
(
0.0
,
0.0
,
0
),
mbFirst
(
true
),
mbTextAsZero
(
bTextAsZero
)
{}
WalkElementBlocks
(
bool
bTextAsZero
)
:
maRes
(
0.0
,
_Op
::
initVal
,
0
),
mbFirst
(
true
),
mbTextAsZero
(
bTextAsZero
)
{}
const
ScMatrix
::
IterateResult
&
getResult
()
const
{
return
maRes
;
}
...
...
@@ -1092,7 +1098,8 @@ ScMatrix::IterateResult ScMatrixImpl::Product(bool bTextAsZero) const
{
WalkElementBlocks
<
ProductOp
>
aFunc
(
bTextAsZero
);
maMat
.
walk
(
aFunc
);
return
aFunc
.
getResult
();
ScMatrix
::
IterateResult
aRes
=
aFunc
.
getResult
();
return
aRes
;
}
size_t
ScMatrixImpl
::
Count
(
bool
bCountStrings
)
const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment