pub fn new<C, T>(symbols: T) -> Self
    where
        C: Borrow<u8>,
        T: IntoIterator<Item = C>,
    {
        let mut s = BitSet::new();
        s.extend(symbols.into_iter().map(|c| *c.borrow() as usize));

        Alphabet { symbols: s }
    }
/// Create new alphabet from given symbols.
///
/// Complexity: O(n), where n is the number of symbols in the alphabet.
///
/// # Example
///
/// ```
/// use bio::alphabets;
///
/// // Create an alphabet (note that a DNA alphabet is already available in bio::alphabets::dna).
/// let dna_alphabet = alphabets::Alphabet::new(b"ACGTacgt");
/// // Check whether a given text is a word over the alphabet.
/// assert!(dna_alphabet.is_word(b"GAttACA"));
/// ```
Create new alphabet from given symbols.
Complexity: O(n), where n is the number of symbols in the alphabet.
Create new alphabet from given symbols . Complexity : O ( n ) where n is the number of symbols in the alphabet .
pub fn new<C, T>(symbols: T) -> Self
    where
        C: Borrow<u8>,
        T: IntoIterator<Item = C>,
    {
        let mut s = BitSet::new();
        s.extend(symbols.into_iter().map(|c| *c.borrow() as usize));
        Alphabet { symbols: s }
    }
pub fn new < C , T > ( symbols : T ) -> Self where C : Borrow < u8 > , T : IntoIterator < Item = C > , { let mut s = BitSet :: new ( ) ; s . extend ( symbols . into_iter ( ) . map ( | c | * c . borrow ( ) as usize ) ) ; Alphabet { symbols : s } }
Create new alphabet from given symbols.
Create new alphabet from given symbols .
symbols
T
symbols
T
example
```
use bio::alphabets.

Create an alphabet (note that a DNA alphabet is already available in bio::alphabets::dna).
let dna_alphabet = alphabets::Alphabet::new(b"ACGTacgt");
Check whether a given text is a word over the alphabet.
assert!(dna_alphabet.is_word(b"GAttACA"));
```
` ` ` use bio :: alphabets . Create an alphabet ( note that a DNA alphabet is already available in bio :: alphabets :: dna ) . let dna_alphabet = alphabets :: Alphabet :: new ( b " ACGTacgt " ) ; Check whether a given text is a word over the alphabet . assert! ( dna_alphabet . is_word ( b " GAttACA " )) ; ` ` `