D22097: Syntax correction in src/backend/hypothesisTest/

Stefan Gerlach noreply at phabricator.kde.org
Wed Jun 26 16:15:03 BST 2019


sgerlach added inline comments.

INLINE COMMENTS

> HypothesisTest.cpp:61
> +void HypothesisTest::setDataSourceType(DataSourceType type) {
> +	if (type != d->dataSourceType) {
> +		d->dataSourceType = type;

no brackets for one-liners

> HypothesisTest.cpp:196
> +
> +	double value;
> +	int df = 0;

define variables just before you need them

> HypothesisTest.cpp:279
> +						(n[1]-1) * gsl_pow_2(std[1]) ) / df );
> +			value = (mean[0] - mean[1]) / (sp * qSqrt(1.0/n[0] + 1.0/n[1]));
> +			printLine(9, "<b>Assumption:</b> Equal Variance b/w both population means");

why qSqrt and not sqrt from cmath?

> HypothesisTest.cpp:321
> +void HypothesisTestPrivate::performTwoSamplePairedTest(TestType test) {
> +	QString test_name;
> +	int n;

define variables just before use

> HypothesisTest.cpp:858
> +		double row = column->valueAt(i);
> +		std += gsl_pow_2( (row - mean));
> +	}

too many parantheses

> HypothesisTest.cpp:903
> +		row = cell1 - cell2;
> +		std += gsl_pow_2( (row - mean));
> +	}

too many parantheses

REPOSITORY
  R262 LabPlot

REVISION DETAIL
  https://phabricator.kde.org/D22097

To: devanshuagarwal, asemke, sgerlach
Cc: sgerlach, kde-edu, asemke, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190626/4f1b054b/attachment.html>


More information about the kde-edu mailing list