public FltVarList Row(int vrow) { FltVarList list = new FltVarList(m_Solver); for (int col = 0; col < m_ColCount; ++col) { list.Add(Cell(vrow, col)); } return(list); }
public FltVarList Col(int vcol) { FltVarList list = new FltVarList(m_Solver); for (int row = 0; row < m_RowCount; ++row) { list.Add(Cell(row, vcol)); } return(list); }
public FltVarMatrix Matrix(int rowOffset, int colOffset, int rowCount, int colCount) { FltVarList list = new FltVarList(m_Solver); for (int row = 0; row < rowCount; ++row) { for (int col = 0; col < colCount; ++col) { list.Add(Cell(rowOffset + row, colOffset + col)); } } return(new FltVarMatrix(m_Solver, rowCount, colCount, list)); }
private void InitMatrix(FltDomain domain) { m_VarList = new FltVarList(m_Solver, m_RowCount * m_ColCount); for (int row = 0; row < m_RowCount; ++row) { for (int col = 0; col < m_ColCount; ++col) { string name = row.ToString() + "." + col.ToString(); FltVar cell = new FltVar(m_Solver, domain, name); m_VarList.Add(cell); } } }
public FltVarList DiagRightTopToBottomLeft() { FltVarList list = new FltVarList(m_Solver); if (m_RowCount == m_ColCount) { int size = m_RowCount; for (int idx = 0; idx < size; ++idx) { list.Add(Cell(idx, (size - 1) - idx)); } } return(list); }
private void InitMatrix( FltDomain domain ) { m_VarList = new FltVarList( m_Solver, m_RowCount * m_ColCount ); for( int row = 0; row < m_RowCount; ++row ) { for( int col = 0; col < m_ColCount; ++col ) { string name = row.ToString() + "." + col.ToString(); FltVar cell = new FltVar( m_Solver, domain, name ); m_VarList.Add( cell ); } } }
public FltVarList Row( int vrow ) { FltVarList list = new FltVarList( m_Solver ); for( int col = 0; col < m_ColCount; ++col ) { list.Add( Cell( vrow, col ) ); } return list; }
public FltVarMatrix Matrix( int rowOffset, int colOffset, int rowCount, int colCount ) { FltVarList list = new FltVarList( m_Solver ); for( int row = 0; row < rowCount; ++row ) { for( int col = 0; col < colCount; ++col ) { list.Add( Cell( rowOffset + row, colOffset + col ) ); } } return new FltVarMatrix( m_Solver, rowCount, colCount, list ); }
public FltVarList DiagRightTopToBottomLeft() { FltVarList list = new FltVarList( m_Solver ); if( m_RowCount == m_ColCount ) { int size = m_RowCount; for( int idx = 0; idx < size; ++idx ) { list.Add( Cell( idx, ( size - 1 ) - idx ) ); } } return list; }
public FltVarList Col( int vcol ) { FltVarList list = new FltVarList( m_Solver ); for( int row = 0; row < m_RowCount; ++row ) { list.Add( Cell( row, vcol ) ); } return list; }