X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fevoinference%2Fparsimony%2FDolloParsimony.java;h=094621873d7c39d464eaf8bdb61881129dfc5449;hb=88718609970e490e94727d12ebbca1270ba2c0a7;hp=65c072c880a585cde49f289bcf61e0f321eca2c5;hpb=eee996a6476a1e3d84c07f8f690dcde3ff4b2ef5;p=jalview.git diff --git a/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java b/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java index 65c072c..0946218 100644 --- a/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java +++ b/forester/java/src/org/forester/evoinference/parsimony/DolloParsimony.java @@ -22,7 +22,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.evoinference.parsimony; @@ -135,7 +135,7 @@ public class DolloParsimony { final BinaryStates state = matrix.getState( indentifier_index, character_index ); if ( state == null ) { throw new IllegalArgumentException( "value at [" + indentifier_index + ", " + character_index - + "] is null" ); + + "] is null" ); } states.put( p.getNode( matrix.getIdentifier( indentifier_index ) ), state ); } @@ -176,8 +176,8 @@ public class DolloParsimony { nodes.add( postorder.next() ); } setGainLossMatrix( new BasicCharacterStateMatrix( nodes.size(), - external_node_states_matrix - .getNumberOfCharacters() ) ); + external_node_states_matrix + .getNumberOfCharacters() ) ); int identifier_index = 0; for( final PhylogenyNode node : nodes ) { getGainLossMatrix().setIdentifier( identifier_index++, @@ -200,8 +200,8 @@ public class DolloParsimony { } } setInternalStatesMatrix( new BasicCharacterStateMatrix( internal_nodes.size(), - external_node_states_matrix - .getNumberOfCharacters() ) ); + external_node_states_matrix + .getNumberOfCharacters() ) ); int identifier_index = 0; for( final PhylogenyNode node : internal_nodes ) { getInternalStatesMatrix().setIdentifier( identifier_index++, @@ -314,17 +314,17 @@ public class DolloParsimony { final PhylogenyNode node, final GainLossStates state ) { getGainLossMatrix().setState( ForesterUtil.isEmpty( node.getName() ) ? node.getId() + "" : node.getName(), - character_state_column, - state ); + character_state_column, + state ); } private void setInternalNodeState( final Map states, final int character_state_column, final PhylogenyNode node ) { getInternalStatesMatrix() - .setState( ForesterUtil.isEmpty( node.getName() ) ? node.getId() + "" : node.getName(), - character_state_column, - states.get( node ) ); + .setState( ForesterUtil.isEmpty( node.getName() ) ? node.getId() + "" : node.getName(), + character_state_column, + states.get( node ) ); } private void setInternalStatesMatrix( final CharacterStateMatrix internal_states_matrix ) { @@ -368,7 +368,7 @@ public class DolloParsimony { final PhylogenyNode node_child = node.getChildNode( i ); if ( !states.containsKey( node_child ) ) { throw new RuntimeException( "this should not have happened: node [" + node_child.getName() - + "] not found in node state map" ); + + "] not found in node state map" ); } if ( ( states.get( node_child ) == BinaryStates.PRESENT ) || ( states.get( node_child ) == BinaryStates.UNKNOWN ) ) {