Update assignment 6 description

This commit is contained in:
Minseong Jang
2022-09-23 11:51:25 +09:00
parent 35aee8ecd4
commit e91413b506

View File

@@ -88,6 +88,18 @@ impl Semiring for f64 {
}
/// Polynomials with coefficient in `C`.
///
/// For example, polynomial `x^2 + 5x + 6` is represented in `Polynomial<u64>` as follows:
///
/// ```
/// Polynomial {
/// coefficients: {
/// 2: 1,
/// 1: 5,
/// 0: 6,
/// },
/// }
/// ```
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Polynomial<C: Semiring> {
coefficients: HashMap<u64, C>,
@@ -118,7 +130,7 @@ impl<C: Semiring> From<C> for Polynomial<C> {
}
impl<C: Semiring> Polynomial<C> {
/// The variable X.
/// Constructs polynomial `x`.
pub fn x() -> Self {
todo!()
}