94 return ( (
id_ == other.
id_ ) &&
101 return !operator==(other);
133 OffLastList = OffReflexes+1
206 bool isValid (
void )
const;
209 bool operator == (
const DNA & other )
const;
242 ID kind (
void )
const;
245 quint64 cost (
void )
const
247 Q_ASSERT(values_i_.length() >= OffMax );
248 return values_i_.at( OffCost );
252 quint64 age (
void )
const
254 Q_ASSERT(values_i_.length() >= OffMax );
255 return values_i_.at( OffAge );
259 quint64 energy (
void )
const
261 Q_ASSERT(values_i_.length() >= OffMax );
262 return values_i_.at( OffStartEnergy );
266 QList<ID> brains (
void )
const;
269 QList<ID> actuators (
void )
const;
272 QList<ID> sensors (
void )
const;
275 QList<ID> reflexes (
void )
const;
278 QVector<Partition> partitions (
void )
const
297 bool addBrain ( ID
id );
306 bool addActuator ( ID
id );
315 bool addSensor ( ID
id );
324 bool addReflex ( ID
id );
333 bool save ( QSettings & stg )
const;
336 bool load ( QSettings & stg );
340 static qreal dnaNoise (
void );
344 int findID ( ID
id )
const;
351 void initDNA (
const InitData & init );
359 void reinitDNA (
const DNA & src,
bool clear_content );
394 const Partition & part_1,
395 const Partition & part_2,
401 const Partition & part,
410 #ifdef APRIL_INTERNAL_TESTS
412 void setParts ( QVector<Partition> & new_val )
413 { parts_ = new_val; }
414 void setValues ( QList<qreal> & new_val )
415 { values_ = new_val; }
416 void setValuesI ( QList<quint64> & new_val )
417 { values_i_ = new_val; }
423 bool getViewNotFound (
446 #endif // __DNA_INC__