Skip to content

预览 cms #1

Open
0 of 1 issue completed
Open

Description

@dzylikecode

下面本质是一个动力学差分方程,也可以说是状态机

@freezed
sealed class S with _$S {
  const factory S.s0() = S0;
  const factory S.s1() = S1;
}

@freezed
sealed class A with _$A {
  const factory A.a0() = A0;
  const factory A.a1() = A1;
}

@CmsGraph()
class M extends Cms<S, A> {
  M() : super(.s0());
  // dart format off
  @override
  Future<S?> kernel(S s, A a) async => switch ((s, a)) {
    (S0 _, A0 _) => () {
                      if (Random().nextBool()) return S.s1();
                      return S.s1();
                    }(),
    (S1 _, A1 _) => .s0(),
    _ => undefined(s, a),
  };
  // dart format on
}

我想对其积分,看到其演化。通过 @CmsGraph() 来做到

xstate 画出了图像

Activity

  1. dzylikecode commented on Dec 24, 2025

    @dzylikecode
    ContributorAuthor

    后续可以,做动力学分析,或者强化学习

  2. dzylikecode commented on Dec 24, 2025

    @dzylikecode
    ContributorAuthor

    后面交互可以考虑动画

    mermaid animate arrow

  3. dzylikecode commented on Jan 7, 2026

    @dzylikecode
    ContributorAuthor
  4. dzylikecode commented on Jan 9, 2026

    @dzylikecode
    ContributorAuthor

    https://thepalindrome.org/p/matrices-and-graphs

    这个正是我想的,不过没有深入理解图的结构和矩阵的结构的对应关系

  5. dzylikecode commented on Jan 9, 2026

    @dzylikecode
    ContributorAuthor
  6. dzylikecode commented on Jan 24, 2026

    @dzylikecode
    ContributorAuthor

    有些结构其实就是矩阵的分块,比如

    fetch_1, fetch_2, 也就是分块矩阵,相当于是子图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions