Index: cpp/frams/genetics/oper_fx.cpp
===================================================================
--- cpp/frams/genetics/oper_fx.cpp	(revision 748)
+++ cpp/frams/genetics/oper_fx.cpp	(revision 749)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -150,5 +150,21 @@
 void GenoOperators::setIntFromDoubleWithProbabilisticDithering(ParamInterface &p, int index, double value) //TODO
 {
-	p.setInt(index, (paInt)value); //TODO value=2.5 will result in 2 but we want it to be 2 or 3 with equal probability. value=2.1 would be mostly 2, rarely 3. Careful with negative values (test it!)
+	p.setInt(index, (paInt)(value + 0.5)); //TODO value=2.499 will result in 2 and 2.5 will result in 3, but we want these cases to be 2 or 3 with almost equal probability. value=2.1 should be mostly 2, rarely 3. Careful with negative values (test it!)
+}
+
+void GenoOperators::linearMix(vector<double> &p1, vector<double> &p2, double proportion)
+{
+	if (p1.size() != p2.size())
+	{
+		logPrintf("GenoOperators", "linearMix", LOG_ERROR, "Cannot mix vectors of different length (%d and %d)", p1.size(), p2.size());
+		return;
+	}
+	for (unsigned int i = 0; i < p1.size(); i++)
+	{
+		double v1 = p1[i];
+		double v2 = p2[i];
+		p1[i] = v1*proportion + v2*(1 - proportion);
+		p2[i] = v2*proportion + v1*(1 - proportion);
+	}
 }
 
Index: cpp/frams/genetics/oper_fx.h
===================================================================
--- cpp/frams/genetics/oper_fx.h	(revision 748)
+++ cpp/frams/genetics/oper_fx.h	(revision 749)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -125,19 +125,19 @@
 	\code
 	{
-		int len=strlen(geno);
-		if (len==0 || random(2)==0) //add
-		{
-			method=0;
-			char* mutated=(char*)malloc(mutated,len+2); //allocate for mutated genotype
-			mutated[0]='A'+random(10); //first char random
-			strcpy(mutated+1,geno); //the rest is original
-			free(geno); //must take care of the original allocation
-			geno=mutated;
-		} else
-		{
-			method=1;
-			geno[len-1]=0; //simply shorten the string - remove last char
-		}
-		chg=1.0/max(len,1); //estimation of mutation strength, divby0-safe
+	int len=strlen(geno);
+	if (len==0 || random(2)==0) //add
+	{
+	method=0;
+	char* mutated=(char*)malloc(mutated,len+2); //allocate for mutated genotype
+	mutated[0]='A'+random(10); //first char random
+	strcpy(mutated+1,geno); //the rest is original
+	free(geno); //must take care of the original allocation
+	geno=mutated;
+	} else
+	{
+	method=1;
+	geno[len-1]=0; //simply shorten the string - remove last char
+	}
+	chg=1.0/max(len,1); //estimation of mutation strength, divby0-safe
 	} \endcode
 	*/
@@ -190,5 +190,6 @@
 	static double mutateCreep(char type, double current, double mn, double mx); ///<just as mutateCreepNoLimit(), but forces mutated value into the [mn,mx] range using the 'reflect' approach.
 	static void setIntFromDoubleWithProbabilisticDithering(ParamInterface &p, int index, double value); ///<sets a double value in an integer field; when a value is non-integer, applies random "dithering" so that both lower and higher integer value have some chance to be set.
-	static void linearMix(ParamInterface &p1, int i1, ParamInterface &p2, int i2, double proportion); ///<mixes i1'th and i2'th properties of p1 and p2; proportion should be within [0,1]; 0.5 causes both properties to become their average. For integer properties applies random "dithering" when necessary.
+	static void linearMix(vector<double> &p1, vector<double> &p2, double proportion); ///<mixes two real-valued vectors; inherited proportion should be within [0,1]; 1.0 does not change values (all inherited), 0.5 causes both vectors to become their average, 0.0 swaps values (none inherited).
+	static void linearMix(ParamInterface &p1, int i1, ParamInterface &p2, int i2, double proportion); ///<mixes i1'th and i2'th properties of p1 and p2; inherited proportion should be within [0,1]; 1.0 does not change values (all inherited), 0.5 causes both properties to become their average, 0.0 swaps values (none inherited). For integer properties applies random "dithering" when necessary.
 	static NeuroClass* getRandomNeuroClass(); ///<returns random neuroclass or NULL when no active classes.
 	static int getRandomNeuroClassWithOutput(const vector<NeuroClass*>& NClist); //returns index of random neuroclass from the NClist or -1 (no neurons on the list that provide output)
@@ -215,8 +216,8 @@
 5,                 // distribution -999 _-^_^-_ +999
 -999, 999,         // each weight value may be useful, especially...
-  -5, -0.3,        // ...little non-zero values
-  -3, -0.6,
- 0.6, 3,
- 0.3, 5,
+-5, -0.3,        // ...little non-zero values
+-3, -0.6,
+0.6, 3,
+0.3, 5,
 };
 */
