| 1 | 1 | ▶ | use Renard::Incunabula::Common::Setup; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Intertangle::Punchcard::Backend::Kiwisolver::Solver; | ||
| 3 | # ABSTRACT: Solver wrapper for Kiwisolver | ||
| 4 | $Intertangle::Punchcard::Backend::Kiwisolver::Solver::VERSION = '0.001'; | ||
| 5 | 1 | ▶ | use Mu; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use Intertangle::API::Kiwisolver; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 7 | use Renard::Incunabula::Common::Types qw(InstanceOf); | ||
| 8 | |||
| 9 | has _delegate => ( | ||
| 10 | is => 'ro', | ||
| 11 | isa => InstanceOf['Intertangle::API::Kiwisolver::Solver'], | ||
| 12 | default => method() { | ||
| 13 | Intertangle::API::Kiwisolver::Solver->new; | ||
| 14 | }, | ||
| 15 | ); | ||
| 16 | |||
| 17 | method add_constraint($constraint) { | ||
| 18 | $self->_delegate->addConstraint($constraint->_delegate); | ||
| 19 | } | ||
| 20 | |||
| 21 | method update() { | ||
| 22 | $self->_delegate->updateVariables; | ||
| 23 | } | ||
| 24 | |||
| 25 | method add_edit_variable($variable, $strength) { | ||
| 26 | $self->_delegate->addEditVariable($variable->_delegate, $strength); | ||
| 27 | } | ||
| 28 | |||
| 29 | method suggest_value($variable, $value) { | ||
| 30 | $self->_delegate->suggestValue($variable->_delegate, $value); | ||
| 31 | } | ||
| 32 | |||
| 33 | 1; | ||
| 34 | |||
| 35 | __END__ | ||
| 36 | |||
| 37 | =pod | ||
| 38 | |||
| 39 | =encoding UTF-8 | ||
| 40 | |||
| 41 | =head1 NAME | ||
| 42 | |||
| 43 | Intertangle::Punchcard::Backend::Kiwisolver::Solver - Solver wrapper for Kiwisolver | ||
| 44 | |||
| 45 | =head1 VERSION | ||
| 46 | |||
| 47 | version 0.001 | ||
| 48 | |||
| 49 | =head1 EXTENDS | ||
| 50 | |||
| 51 | =over 4 | ||
| 52 | |||
| 53 | =item * L<Moo::Object> | ||
| 54 | |||
| 55 | =back | ||
| 56 | |||
| 57 | =head1 METHODS | ||
| 58 | |||
| 59 | =head2 add_constraint | ||
| 60 | |||
| 61 | ... | ||
| 62 | |||
| 63 | =head2 update | ||
| 64 | |||
| 65 | ... | ||
| 66 | |||
| 67 | =head2 add_edit_variable | ||
| 68 | |||
| 69 | ... | ||
| 70 | |||
| 71 | =head2 suggest_value | ||
| 72 | |||
| 73 | ... | ||
| 74 | |||
| 75 | =head1 AUTHOR | ||
| 76 | |||
| 77 | Zakariyya Mughal <zmughal@cpan.org> | ||
| 78 | |||
| 79 | =head1 COPYRIGHT AND LICENSE | ||
| 80 | |||
| 81 | This software is copyright (c) 2019 by Zakariyya Mughal. | ||
| 82 | |||
| 83 | This is free software; you can redistribute it and/or modify it under | ||
| 84 | the same terms as the Perl 5 programming language system itself. | ||
| 85 | |||
| 86 | =cut | ||