-
Notifications
You must be signed in to change notification settings - Fork 13
/
crossover.dart
48 lines (34 loc) · 1.31 KB
/
crossover.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import 'package:built_value/serializer.dart';
import '../state/strand_part.dart';
import '../serializers.dart';
import 'linker.dart';
import 'select_mode.dart';
import 'selectable.dart';
import 'package:built_value/built_value.dart';
part 'crossover.g.dart';
abstract class Crossover
with SelectableMixin, BuiltJsonSerializable
implements Built<Crossover, CrossoverBuilder>, Linker, StrandPart {
factory Crossover(int prev_domain_idx, int next_domain_idx, String strand_id, bool is_scaffold) =>
Crossover.from((b) => b
..prev_domain_idx = prev_domain_idx
..next_domain_idx = next_domain_idx
..strand_id = strand_id
..is_scaffold = is_scaffold);
factory Crossover.from([void Function(CrossoverBuilder) updates]) = _$Crossover;
Crossover._();
static Serializer<Crossover> get serializer => _$crossoverSerializer;
@memoized
int get hashCode;
/************************ end BuiltValue boilerplate ************************/
// idx's within Strand.substrands (not Strand.domains)
int get prev_domain_idx;
int get next_domain_idx;
bool get is_scaffold;
@nullable
String get strand_id;
@memoized
SelectModeChoice get select_mode => SelectModeChoice.crossover;
@memoized
String get id => 'crossover-${prev_domain_idx}-${next_domain_idx}-${strand_id}';
}