Home > Mateda2.0 > functions > protein > NewFeasible.m

# NewFeasible

## PURPOSE

NewFeasible evaluates if a given move is feasible.

## SYNOPSIS

function[is_feasible] = NewFeasible(s,i,Pos)

## DESCRIPTION

     NewFeasible evaluates if a given move is feasible.

## CROSS-REFERENCE INFORMATION

This function calls:

- CheckConstraint [Overlappings,Pos] = CheckConstraint(Pos,pos,vector)

This function is called by:

- HP_newrepairing HP_newrepairing: An auxiliary function that modifies a sequence configuration to avoid self-intersections

## SOURCE CODE

    0001 function[is_feasible] = NewFeasible(s,i,Pos)
    0002 % NewFeasible evaluates if a given move is feasible.
    0003
    0004   global HPInitConf;
    0005
    0006    if (size(s,2) <=2)
    0007        is_feasible=1;
    0008        return;
    0009    else
    0010        [Overlappings,Pos] =  CheckConstraint(Pos,i,s);
    0011         is_feasible = (Overlappings==0);
    0012    end
    0013
    0014 % Last version 10/09/2005. Roberto Santana (rsantana@si.ehu.es)