mirror of https://github.com/zcash/halo2.git
Add some functionalities for MuxChip
This commit is contained in:
parent
54697b22ed
commit
4ce262d8e7
|
@ -48,7 +48,7 @@ impl EccPoint {
|
|||
/// Constructs a point from its coordinates, without checking they are on the curve.
|
||||
///
|
||||
/// This is an internal API that we only use where we know we have a valid curve point.
|
||||
pub(crate) fn from_coordinates_unchecked(
|
||||
pub fn from_coordinates_unchecked(
|
||||
x: AssignedCell<Assigned<pallas::Base>, pallas::Base>,
|
||||
y: AssignedCell<Assigned<pallas::Base>, pallas::Base>,
|
||||
) -> Self {
|
||||
|
|
|
@ -139,6 +139,16 @@ impl<F: Field> AssignedCell<Assigned<F>, F> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<F: Field> From<AssignedCell<F, F>> for AssignedCell<Assigned<F>, F> {
|
||||
fn from(ac: AssignedCell<F, F>) -> Self {
|
||||
AssignedCell {
|
||||
value: ac.value.map(|a| a.into()),
|
||||
cell: ac.cell,
|
||||
_marker: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<V: Clone, F: Field> AssignedCell<V, F>
|
||||
where
|
||||
for<'v> Assigned<F>: From<&'v V>,
|
||||
|
|
Loading…
Reference in New Issue