和顺 / 知衡 返回所属 Agent
ZH-07.02

组合暴露复核

原能力

整理资产类别、行业、币种和流动性暴露,标记欠缺资料的归属。(细化版 p.16–17)

首选项目

DuckDB(MIT(核心))。 DuckDB

匹配范围

聚合行业、币种、资产类型暴露并检查缺失。

源码

DuckDB · SinkResultType PhysicalHashAggregate::Sink(

src/execution/operator/aggregate/physical_hash_aggregate.cpp · 396–409 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
SinkResultType PhysicalHashAggregate::Sink(ExecutionContext &context, DataChunk &chunk,
                                           OperatorSinkInput &input) const {
	auto &local_state = input.local_state.Cast<HashAggregateLocalSinkState>();
	auto &global_state = input.global_state.Cast<HashAggregateGlobalSinkState>();

	if (distinct_collection_info) {
		SinkDistinct(context, chunk, input);
	}

	if (CanSkipRegularSink()) {
		return SinkResultType::NEED_MORE_INPUT;
	}

	DataChunk &aggregate_input_chunk = local_state.aggregate_input_chunk;

CVXPY · class Problem

cvxpy/problems/problem.py · 135–148 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
class Problem(u.Canonical):
    """A convex optimization problem.

    Problems are immutable, save for modification through the specification
    of :class:`~cvxpy.expressions.constants.parameters.Parameter`

    Arguments
    ---------
    objective : Minimize or Maximize
        The problem's objective.
    constraints : iterable
        The constraints on the problem variables.
    """
  • Copyright 2013 Steven Diamond, 2017 Akshay Agrawal

实现与验收要点

多层穿透、衍生与公平分配、真实流动性。