src/main/java/org/thegalactic/context/constraint/categorical/CategoricalModel.java
public int startIndex(final CategoricalAttribute attribute) {
        if (this.equals(attribute.getModel())) {
            int start;
            if (this.instantiated) {
                start = this.startIndex.get(attribute);
            } else {
                start = 0;
                for (final CategoricalAttribute current : this.attributes) {
                    if (attribute.equals(current)) {
                        break;
                    } else {
                        start += current.size();
                    }
                }
            }
            return start;
        } else {
            throw new IllegalArgumentException("The CategoricalAttribute is not in this model");
        }
    }
/**
     * Get the startIndex index of this attribute in its model.
     *
     * @param attribute CategoricalAttribute
     *
     * @return the startIndex
     */
Get the startIndex index of this attribute in its model.

@return the startIndex
Get the startIndex index of this attribute in its model . @return the startIndex
public int startIndex(final CategoricalAttribute attribute) {
        if (this.equals(attribute.getModel())) {
            int start;
            if (this.instantiated) {
                start = this.startIndex.get(attribute);
            } else {
                start = 0;
                for (final CategoricalAttribute current : this.attributes) {
                    if (attribute.equals(current)) {
                        break;
                    } else {
                        start += current.size();
                    }
                }
            }
            return start;
        } else {
            throw new IllegalArgumentException("The CategoricalAttribute is not in this model");
        }
    }
public int startIndex ( final CategoricalAttribute attribute ) { if ( this . equals ( attribute . getModel ( ) ) ) { int start ; if ( this . instantiated ) { start = this . startIndex . get ( attribute ) ; } else { start = 0 ; for ( final CategoricalAttribute current : this . attributes ) { if ( attribute . equals ( current ) ) { break ; } else { start += current . size ( ) ; } } } return start ; } else { throw new IllegalArgumentException ( "The CategoricalAttribute is not in this model" ) ; } }
Get the startIndex index of this attribute in its model.
Get the startIndex index of this attribute in its model .