Commit 4b6283fe authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

Predicates: test

parent fe0ed617
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@ sub createMakefile
	continuedFractionCollection range kernelPolynomial fit
	linearPrediction options randomTest svd testLapack threads loadImbalance testIsClass
	testMemResolv1 sumDecomposition calculator closuresTest base64test checkRunId
	testLanczos testExcitedLanczos testLanczosMatrixInFile nested testIoNg testIoNgBoolean affinityTest);
	testLanczos testExcitedLanczos testLanczosMatrixInFile nested testIoNg testIoNgBoolean
	affinityTest testPredicate);

	my %args;
	$args{"code"} = "PsimagLite/drivers";
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ sub createMakefile
	local *FH = $fh;
	my @units = ("MersenneTwister","Matrix","Mpi","Concurrency",
	"ProgressIndicator","MemResolv","PsimagLite","PsiBase64",
	"SpecialFunctions", "Io/TypeToH5", "TridiagonalMatrix");
	"SpecialFunctions", "Io/TypeToH5", "TridiagonalMatrix", "PredicateSimple");
	my $combinedUnits = combine("",\@units,".o ");
	my $combinedUnitsModif = $combinedUnits;
	$combinedUnitsModif =~ s/Io\///;
+4 −4
Original line number Diff line number Diff line
@@ -56,22 +56,22 @@ struct IsNumber {
};

template<typename T>
typename EnableIf<Loki::TypeTraits<T>::isFloat,T>::Type
typename EnableIf<Loki::TypeTraits<T>::isArith,T>::Type
real(T t) { return t; }

template<typename T>
typename EnableIf<Loki::TypeTraits<T>::isFloat,T>::Type
typename EnableIf<Loki::TypeTraits<T>::isArith,T>::Type
real(const std::complex<T>& t)
{
	return std::real(t);
}

template<typename T>
typename EnableIf<Loki::TypeTraits<T>::isFloat,T>::Type
typename EnableIf<Loki::TypeTraits<T>::isArith,T>::Type
imag(T) { return 0.0; }

template<typename T>
typename EnableIf<Loki::TypeTraits<T>::isFloat,T>::Type
typename EnableIf<Loki::TypeTraits<T>::isArith,T>::Type
imag(const std::complex<T>& t)
{
	return std::imag(t);
+2 −2
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ private:
	}

	template<typename T>
	static typename EnableIf<Loki::TypeTraits<T>::isStdFloat,
	static typename EnableIf<Loki::TypeTraits<T>::isArith,
	T>::Type myExponential(T v)
	{
		return ::exp(v);
@@ -217,7 +217,7 @@ private:
	}

	template<typename T>
	static typename EnableIf<Loki::TypeTraits<T>::isStdFloat,
	static typename EnableIf<Loki::TypeTraits<T>::isArith,
	T>::Type eToTheI(T x)
	{
		throw RuntimeError("eToTheI(" + ttos(x) + "): not unless T is complex\n");